PHP Classes

File: CoffeeCMS/contents/themes/cfnews/assets/moment/src/locale/cs.js

Recommend this page to a friend!
  Classes of James Brows   Coffee CMS   CoffeeCMS/contents/themes/cfnews/assets/moment/src/locale/cs.js   Download  
File: CoffeeCMS/contents/themes/cfnews/assets/moment/src/locale/cs.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Coffee CMS
Content management system using MVC based themes
Author: By
Last change:
Date: 2 years ago
Size: 5,872 bytes
 

Contents

Class file image Download
//! moment.js locale configuration //! locale : Czech [cs] //! author : petrbela : https://github.com/petrbela import moment from '../moment'; var months = 'leden_únor_b?ezen_duben_kv?ten_?erven_?ervenec_srpen_zá?í_?íjen_listopad_prosinec'.split('_'), monthsShort = 'led_úno_b?e_dub_kv?_?vn_?vc_srp_zá?_?íj_lis_pro'.split('_'); function plural(n) { return (n > 1) && (n < 5) && (~~(n / 10) !== 1); } function translate(number, withoutSuffix, key, isFuture) { var result = number + ' '; switch (key) { case 's': // a few seconds / in a few seconds / a few seconds ago return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami'; case 'm': // a minute / in a minute / a minute ago return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou'); case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago if (withoutSuffix || isFuture) { return result + (plural(number) ? 'minuty' : 'minut'); } else { return result + 'minutami'; } break; case 'h': // an hour / in an hour / an hour ago return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou'); case 'hh': // 9 hours / in 9 hours / 9 hours ago if (withoutSuffix || isFuture) { return result + (plural(number) ? 'hodiny' : 'hodin'); } else { return result + 'hodinami'; } break; case 'd': // a day / in a day / a day ago return (withoutSuffix || isFuture) ? 'den' : 'dnem'; case 'dd': // 9 days / in 9 days / 9 days ago if (withoutSuffix || isFuture) { return result + (plural(number) ? 'dny' : 'dní'); } else { return result + 'dny'; } break; case 'M': // a month / in a month / a month ago return (withoutSuffix || isFuture) ? 'm?síc' : 'm?sícem'; case 'MM': // 9 months / in 9 months / 9 months ago if (withoutSuffix || isFuture) { return result + (plural(number) ? 'm?síce' : 'm?síc?'); } else { return result + 'm?síci'; } break; case 'y': // a year / in a year / a year ago return (withoutSuffix || isFuture) ? 'rok' : 'rokem'; case 'yy': // 9 years / in 9 years / 9 years ago if (withoutSuffix || isFuture) { return result + (plural(number) ? 'roky' : 'let'); } else { return result + 'lety'; } break; } } export default moment.defineLocale('cs', { months : months, monthsShort : monthsShort, monthsParse : (function (months, monthsShort) { var i, _monthsParse = []; for (i = 0; i < 12; i++) { // use custom parser to solve problem with July (?ervenec) _monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i'); } return _monthsParse; }(months, monthsShort)), shortMonthsParse : (function (monthsShort) { var i, _shortMonthsParse = []; for (i = 0; i < 12; i++) { _shortMonthsParse[i] = new RegExp('^' + monthsShort[i] + '$', 'i'); } return _shortMonthsParse; }(monthsShort)), longMonthsParse : (function (months) { var i, _longMonthsParse = []; for (i = 0; i < 12; i++) { _longMonthsParse[i] = new RegExp('^' + months[i] + '$', 'i'); } return _longMonthsParse; }(months)), weekdays : 'ned?le_pond?lí_úterý_st?eda_?tvrtek_pátek_sobota'.split('_'), weekdaysShort : 'ne_po_út_st_?t_pá_so'.split('_'), weekdaysMin : 'ne_po_út_st_?t_pá_so'.split('_'), longDateFormat : { LT: 'H:mm', LTS : 'H:mm:ss', L : 'DD.MM.YYYY', LL : 'D. MMMM YYYY', LLL : 'D. MMMM YYYY H:mm', LLLL : 'dddd D. MMMM YYYY H:mm', l : 'D. M. YYYY' }, calendar : { sameDay: '[dnes v] LT', nextDay: '[zítra v] LT', nextWeek: function () { switch (this.day()) { case 0: return '[v ned?li v] LT'; case 1: case 2: return '[v] dddd [v] LT'; case 3: return '[ve st?edu v] LT'; case 4: return '[ve ?tvrtek v] LT'; case 5: return '[v pátek v] LT'; case 6: return '[v sobotu v] LT'; } }, lastDay: '[v?era v] LT', lastWeek: function () { switch (this.day()) { case 0: return '[minulou ned?li v] LT'; case 1: case 2: return '[minulé] dddd [v] LT'; case 3: return '[minulou st?edu v] LT'; case 4: case 5: return '[minulý] dddd [v] LT'; case 6: return '[minulou sobotu v] LT'; } }, sameElse: 'L' }, relativeTime : { future : 'za %s', past : 'p?ed %s', s : translate, m : translate, mm : translate, h : translate, hh : translate, d : translate, dd : translate, M : translate, MM : translate, y : translate, yy : translate }, dayOfMonthOrdinalParse : /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. doy : 4 // The week that contains Jan 4th is the first week of the year. } });