momentjs-rails 1.7.2 → 2.0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. data/README.md +1 -1
  2. data/{changelog.md → news.md} +30 -12
  3. data/test/dummy/Rakefile +7 -0
  4. data/test/dummy/config.ru +4 -0
  5. data/test/dummy/config/application.rb +65 -0
  6. data/test/dummy/config/boot.rb +10 -0
  7. data/test/dummy/config/environment.rb +5 -0
  8. data/test/dummy/config/environments/development.rb +31 -0
  9. data/test/dummy/config/environments/production.rb +64 -0
  10. data/test/dummy/config/environments/test.rb +35 -0
  11. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  12. data/test/dummy/config/initializers/inflections.rb +15 -0
  13. data/test/dummy/config/initializers/mime_types.rb +5 -0
  14. data/test/dummy/config/initializers/secret_token.rb +7 -0
  15. data/test/dummy/config/initializers/session_store.rb +8 -0
  16. data/test/dummy/config/initializers/wrap_parameters.rb +10 -0
  17. data/test/dummy/config/locales/en.yml +5 -0
  18. data/test/dummy/config/routes.rb +2 -0
  19. data/test/dummy/log/test.log +76 -0
  20. data/test/dummy/tmp/cache/assets/D1C/680/sprockets%2F16ed4d5afdb2919596e6f8790e2116c2 +0 -0
  21. data/test/dummy/tmp/cache/assets/D35/CA0/sprockets%2F493e64bce2d302801dc01cf7cd096a58 +0 -0
  22. data/test/dummy/tmp/cache/assets/D3F/5F0/sprockets%2F4a6c53eae7c6e41a69a191578bbb6417 +0 -0
  23. data/test/dummy/tmp/cache/assets/D58/BD0/sprockets%2F4de9ddc9b725c715a54c98697b2528fe +0 -0
  24. data/test/dummy/tmp/cache/assets/D75/510/sprockets%2Fe690787ac522f47a6be024bfcc1767ee +0 -0
  25. data/test/dummy/tmp/cache/assets/E10/250/sprockets%2Fe4badb9ddfda484eb9671bf88567be61 +0 -0
  26. data/test/integration/navigation_test.rb +14 -0
  27. data/test/momentjs-rails_test.rb +7 -0
  28. data/test/test_helper.rb +15 -0
  29. data/vendor/assets/javascripts/moment.js +542 -355
  30. data/vendor/assets/javascripts/moment/ar-ma.js +46 -0
  31. data/vendor/assets/javascripts/moment/ar.js +45 -0
  32. data/vendor/assets/javascripts/moment/bg.js +71 -61
  33. data/vendor/assets/javascripts/moment/ca.js +51 -59
  34. data/vendor/assets/javascripts/moment/cs.js +145 -0
  35. data/vendor/assets/javascripts/moment/cv.js +45 -53
  36. data/vendor/assets/javascripts/moment/da.js +41 -49
  37. data/vendor/assets/javascripts/moment/de.js +41 -49
  38. data/vendor/assets/javascripts/moment/en-ca.js +44 -53
  39. data/vendor/assets/javascripts/moment/en-gb.js +48 -53
  40. data/vendor/assets/javascripts/moment/eo.js +55 -0
  41. data/vendor/assets/javascripts/moment/es.js +51 -59
  42. data/vendor/assets/javascripts/moment/et.js +44 -61
  43. data/vendor/assets/javascripts/moment/eu.js +46 -50
  44. data/vendor/assets/javascripts/moment/fi.js +84 -89
  45. data/vendor/assets/javascripts/moment/fr-ca.js +39 -49
  46. data/vendor/assets/javascripts/moment/fr.js +43 -49
  47. data/vendor/assets/javascripts/moment/gl.js +51 -59
  48. data/vendor/assets/javascripts/moment/he.js +46 -0
  49. data/vendor/assets/javascripts/moment/hu.js +77 -98
  50. data/vendor/assets/javascripts/moment/id.js +57 -0
  51. data/vendor/assets/javascripts/moment/is.js +103 -121
  52. data/vendor/assets/javascripts/moment/it.js +41 -49
  53. data/vendor/assets/javascripts/moment/ja.js +43 -56
  54. data/vendor/assets/javascripts/moment/ko.js +42 -54
  55. data/vendor/assets/javascripts/moment/lv.js +67 -0
  56. data/vendor/assets/javascripts/moment/nb.js +41 -49
  57. data/vendor/assets/javascripts/moment/ne.js +95 -0
  58. data/vendor/assets/javascripts/moment/nl.js +52 -57
  59. data/vendor/assets/javascripts/moment/pl.js +73 -70
  60. data/vendor/assets/javascripts/moment/pt-br.js +42 -54
  61. data/vendor/assets/javascripts/moment/pt.js +45 -53
  62. data/vendor/assets/javascripts/moment/ro.js +40 -49
  63. data/vendor/assets/javascripts/moment/ru.js +105 -114
  64. data/vendor/assets/javascripts/moment/sl.js +134 -0
  65. data/vendor/assets/javascripts/moment/sv.js +48 -53
  66. data/vendor/assets/javascripts/moment/th.js +48 -0
  67. data/vendor/assets/javascripts/moment/tr.js +69 -75
  68. data/vendor/assets/javascripts/moment/tzm-la.js +45 -0
  69. data/vendor/assets/javascripts/moment/tzm.js +45 -0
  70. data/vendor/assets/javascripts/moment/uk.js +122 -0
  71. data/vendor/assets/javascripts/moment/zh-cn.js +53 -62
  72. data/vendor/assets/javascripts/moment/zh-tw.js +53 -62
  73. metadata +121 -54
  74. data/vendor/assets/javascripts/moment/jp.js +0 -64
  75. data/vendor/assets/javascripts/moment/kr.js +0 -61
@@ -0,0 +1,48 @@
1
+ // moment.js language configuration
2
+ // language : thai (th)
3
+ // author : Kridsada Thanabulpong : https://github.com/sirn
4
+
5
+ require('../moment').lang('th', {
6
+ months : "มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),
7
+ monthsShort : "มกรา_กุมภา_มีนา_เมษา_พฤษภา_มิถุนา_กรกฎา_สิงหา_กันยา_ตุลา_พฤศจิกา_ธันวา".split("_"),
8
+ weekdays : "อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),
9
+ weekdaysShort : "อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"), // yes, three characters difference
10
+ weekdaysMin : "อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),
11
+ longDateFormat : {
12
+ LT : "H นาฬิกา m นาที",
13
+ L : "YYYY/MM/DD",
14
+ LL : "D MMMM YYYY",
15
+ LLL : "D MMMM YYYY เวลา LT",
16
+ LLLL : "วันddddที่ D MMMM YYYY เวลา LT"
17
+ },
18
+ meridiem : function (hour, minute, isLower) {
19
+ if (hour < 12) {
20
+ return "ก่อนเที่ยง";
21
+ } else {
22
+ return "หลังเที่ยง";
23
+ }
24
+ },
25
+ calendar : {
26
+ sameDay : '[วันนี้ เวลา] LT',
27
+ nextDay : '[พรุ่งนี้ เวลา] LT',
28
+ nextWeek : 'dddd[หน้า เวลา] LT',
29
+ lastDay : '[เมื่อวานนี้ เวลา] LT',
30
+ lastWeek : '[วัน]dddd[ที่แล้ว เวลา] LT',
31
+ sameElse : 'L'
32
+ },
33
+ relativeTime : {
34
+ future : "อีก %s",
35
+ past : "%sที่แล้ว",
36
+ s : "ไม่กี่วินาที",
37
+ m : "1 นาที",
38
+ mm : "%d นาที",
39
+ h : "1 ชั่วโมง",
40
+ hh : "%d ชั่วโมง",
41
+ d : "1 วัน",
42
+ dd : "%d วัน",
43
+ M : "1 เดือน",
44
+ MM : "%d เดือน",
45
+ y : "1 ปี",
46
+ yy : "%d ปี"
47
+ }
48
+ });
@@ -2,87 +2,81 @@
2
2
  // language : turkish (tr)
3
3
  // authors : Erhan Gundogan : https://github.com/erhangundogan,
4
4
  // Burak Yiğit Kaya: https://github.com/BYK
5
- (function () {
6
- var suffixes = {
7
- 1: "'inci",
8
- 5: "'inci",
9
- 8: "'inci",
10
- 70: "'inci",
11
- 80: "'inci",
12
5
 
13
- 2: "'nci",
14
- 7: "'nci",
15
- 20: "'nci",
16
- 50: "'nci",
6
+ var suffixes = {
7
+ 1: "'inci",
8
+ 5: "'inci",
9
+ 8: "'inci",
10
+ 70: "'inci",
11
+ 80: "'inci",
17
12
 
18
- 3: "'üncü",
19
- 4: "'üncü",
20
- 100: "'üncü",
13
+ 2: "'nci",
14
+ 7: "'nci",
15
+ 20: "'nci",
16
+ 50: "'nci",
21
17
 
22
- 6: "'ncı",
18
+ 3: "'üncü",
19
+ 4: "'üncü",
20
+ 100: "'üncü",
23
21
 
24
- 9: "'uncu",
25
- 10: "'uncu",
26
- 30: "'uncu",
22
+ 6: "'ncı",
27
23
 
28
- 60: "'ıncı",
29
- 90: "'ıncı"
30
- };
31
- var lang = {
32
- months : "Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),
33
- monthsShort : "Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),
34
- weekdays : "Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),
35
- weekdaysShort : "Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),
36
- weekdaysMin : "Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),
37
- longDateFormat : {
38
- LT : "HH:mm",
39
- L : "DD.MM.YYYY",
40
- LL : "D MMMM YYYY",
41
- LLL : "D MMMM YYYY LT",
42
- LLLL : "dddd, D MMMM YYYY LT"
43
- },
44
- calendar : {
45
- sameDay : '[bugün saat] LT',
46
- nextDay : '[yarın saat] LT',
47
- nextWeek : '[haftaya] dddd [saat] LT',
48
- lastDay : '[dün] LT',
49
- lastWeek : '[geçen hafta] dddd [saat] LT',
50
- sameElse : 'L'
51
- },
52
- relativeTime : {
53
- future : "%s sonra",
54
- past : "%s önce",
55
- s : "birkaç saniye",
56
- m : "bir dakika",
57
- mm : "%d dakika",
58
- h : "bir saat",
59
- hh : "%d saat",
60
- d : "bir gün",
61
- dd : "%d gün",
62
- M : "bir ay",
63
- MM : "%d ay",
64
- y : "bir yıl",
65
- yy : "%d yıl"
66
- },
67
- ordinal : function (number) {
68
- if (number === 0) { // special case for zero
69
- return "'ıncı";
70
- }
24
+ 9: "'uncu",
25
+ 10: "'uncu",
26
+ 30: "'uncu",
71
27
 
72
- var a = number % 10;
73
- var b = number % 100 - a;
74
- var c = number >= 100 ? 100 : null;
28
+ 60: "'ıncı",
29
+ 90: "'ıncı"
30
+ };
75
31
 
76
- return suffixes[a] || suffixes[b] || suffixes[c];
77
- }
78
- };
32
+ require('../moment').lang('tr', {
33
+ months : "Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),
34
+ monthsShort : "Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),
35
+ weekdays : "Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),
36
+ weekdaysShort : "Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),
37
+ weekdaysMin : "Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),
38
+ longDateFormat : {
39
+ LT : "HH:mm",
40
+ L : "DD.MM.YYYY",
41
+ LL : "D MMMM YYYY",
42
+ LLL : "D MMMM YYYY LT",
43
+ LLLL : "dddd, D MMMM YYYY LT"
44
+ },
45
+ calendar : {
46
+ sameDay : '[bugün saat] LT',
47
+ nextDay : '[yarın saat] LT',
48
+ nextWeek : '[haftaya] dddd [saat] LT',
49
+ lastDay : '[dün] LT',
50
+ lastWeek : '[geçen hafta] dddd [saat] LT',
51
+ sameElse : 'L'
52
+ },
53
+ relativeTime : {
54
+ future : "%s sonra",
55
+ past : "%s önce",
56
+ s : "birkaç saniye",
57
+ m : "bir dakika",
58
+ mm : "%d dakika",
59
+ h : "bir saat",
60
+ hh : "%d saat",
61
+ d : "bir gün",
62
+ dd : "%d gün",
63
+ M : "bir ay",
64
+ MM : "%d ay",
65
+ y : "bir yıl",
66
+ yy : "%d yıl"
67
+ },
68
+ ordinal : function (number) {
69
+ if (number === 0) { // special case for zero
70
+ return number + "'ıncı";
71
+ }
72
+ var a = number % 10,
73
+ b = number % 100 - a,
74
+ c = number >= 100 ? 100 : null;
79
75
 
80
- // Node
81
- if (typeof module !== 'undefined' && module.exports) {
82
- module.exports = lang;
76
+ return number + (suffixes[a] || suffixes[b] || suffixes[c]);
77
+ },
78
+ week : {
79
+ dow : 1, // Monday is the first day of the week.
80
+ doy : 7 // The week that contains Jan 1st is the first week of the year.
83
81
  }
84
- // Browser
85
- if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
86
- this.moment.lang('tr', lang);
87
- }
88
- }());
82
+ });
@@ -0,0 +1,45 @@
1
+ // moment.js language configuration
2
+ // language : Morocco Central Atlas Tamaziɣt in Latin (tzm-la)
3
+ // author : Abdel Said : https://github.com/abdelsaid
4
+
5
+ require('../moment').lang('tzm-la', {
6
+ months : "innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),
7
+ monthsShort : "innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),
8
+ weekdays : "asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),
9
+ weekdaysShort : "asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),
10
+ weekdaysMin : "asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),
11
+ longDateFormat : {
12
+ LT : "HH:mm",
13
+ L : "DD/MM/YYYY",
14
+ LL : "D MMMM YYYY",
15
+ LLL : "D MMMM YYYY LT",
16
+ LLLL : "dddd D MMMM YYYY LT"
17
+ },
18
+ calendar : {
19
+ sameDay: "[asdkh g] LT",
20
+ nextDay: '[aska g] LT',
21
+ nextWeek: 'dddd [g] LT',
22
+ lastDay: '[assant g] LT',
23
+ lastWeek: 'dddd [g] LT',
24
+ sameElse: 'L'
25
+ },
26
+ relativeTime : {
27
+ future : "dadkh s yan %s",
28
+ past : "yan %s",
29
+ s : "imik",
30
+ m : "minuḍ",
31
+ mm : "%d minuḍ",
32
+ h : "saɛa",
33
+ hh : "%d tassaɛin",
34
+ d : "ass",
35
+ dd : "%d ossan",
36
+ M : "ayowr",
37
+ MM : "%d iyyirn",
38
+ y : "asgas",
39
+ yy : "%d isgasn"
40
+ },
41
+ week : {
42
+ dow : 6, // Saturday is the first day of the week.
43
+ doy : 12 // The week that contains Jan 1st is the first week of the year.
44
+ }
45
+ });
@@ -0,0 +1,45 @@
1
+ // moment.js language configuration
2
+ // language : Morocco Central Atlas Tamaziɣt (tzm)
3
+ // author : Abdel Said : https://github.com/abdelsaid
4
+
5
+ require('../moment').lang('tzm', {
6
+ months : "ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),
7
+ monthsShort : "ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),
8
+ weekdays : "ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),
9
+ weekdaysShort : "ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),
10
+ weekdaysMin : "ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),
11
+ longDateFormat : {
12
+ LT : "HH:mm",
13
+ L : "DD/MM/YYYY",
14
+ LL : "D MMMM YYYY",
15
+ LLL : "D MMMM YYYY LT",
16
+ LLLL : "dddd D MMMM YYYY LT"
17
+ },
18
+ calendar : {
19
+ sameDay: "[ⴰⵙⴷⵅ ⴴ] LT",
20
+ nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',
21
+ nextWeek: 'dddd [ⴴ] LT',
22
+ lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',
23
+ lastWeek: 'dddd [ⴴ] LT',
24
+ sameElse: 'L'
25
+ },
26
+ relativeTime : {
27
+ future : "ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",
28
+ past : "ⵢⴰⵏ %s",
29
+ s : "ⵉⵎⵉⴽ",
30
+ m : "ⵎⵉⵏⵓⴺ",
31
+ mm : "%d ⵎⵉⵏⵓⴺ",
32
+ h : "ⵙⴰⵄⴰ",
33
+ hh : "%d ⵜⴰⵙⵙⴰⵄⵉⵏ",
34
+ d : "ⴰⵙⵙ",
35
+ dd : "%d oⵙⵙⴰⵏ",
36
+ M : "ⴰⵢoⵓⵔ",
37
+ MM : "%d ⵉⵢⵢⵉⵔⵏ",
38
+ y : "ⴰⵙⴳⴰⵙ",
39
+ yy : "%d ⵉⵙⴳⴰⵙⵏ"
40
+ },
41
+ week : {
42
+ dow : 6, // Saturday is the first day of the week.
43
+ doy : 12 // The week that contains Jan 1st is the first week of the year.
44
+ }
45
+ });
@@ -0,0 +1,122 @@
1
+ // moment.js language configuration
2
+ // language : ukrainian (uk)
3
+ // author : zemlanin : https://github.com/zemlanin
4
+ var pluralRules = [
5
+ function (n) { return ((n % 10 === 1) && (n % 100 !== 11)); },
6
+ function (n) { return ((n % 10) >= 2 && (n % 10) <= 4 && ((n % 10) % 1) === 0) && ((n % 100) < 12 || (n % 100) > 14); },
7
+ function (n) { return ((n % 10) === 0 || ((n % 10) >= 5 && (n % 10) <= 9 && ((n % 10) % 1) === 0) || ((n % 100) >= 11 && (n % 100) <= 14 && ((n % 100) % 1) === 0)); },
8
+ function (n) { return true; }
9
+ ];
10
+
11
+ function plural(word, num) {
12
+ var forms = word.split('_'),
13
+ minCount = Math.min(pluralRules.length, forms.length),
14
+ i = -1;
15
+
16
+ while (++i < minCount) {
17
+ if (pluralRules[i](num)) {
18
+ return forms[i];
19
+ }
20
+ }
21
+ return forms[minCount - 1];
22
+ }
23
+
24
+ function relativeTimeWithPlural(number, withoutSuffix, key) {
25
+ var format = {
26
+ 'mm': 'хвилина_хвилини_хвилин_хвилини',
27
+ 'hh': 'година_години_годин_години',
28
+ 'dd': 'день_дня_днів_дня',
29
+ 'MM': 'місяць_місяця_місяців_місяця',
30
+ 'yy': 'рік_року_років_року'
31
+ };
32
+ if (key === 'm') {
33
+ return withoutSuffix ? 'хвилина' : 'хвилину';
34
+ }
35
+ else {
36
+ return number + ' ' + plural(format[key], +number);
37
+ }
38
+ }
39
+
40
+ function monthsCaseReplace(m, format) {
41
+ var months = {
42
+ 'nominative': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_'),
43
+ 'accusative': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_')
44
+ },
45
+
46
+ nounCase = (/D[oD]? *MMMM?/).test(format) ?
47
+ 'accusative' :
48
+ 'nominative';
49
+
50
+ return months[nounCase][m.month()];
51
+ }
52
+
53
+ function weekdaysCaseReplace(m, format) {
54
+ var weekdays = {
55
+ 'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),
56
+ 'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_')
57
+ },
58
+
59
+ nounCase = (/\[ ?[Вв] ?(?:попередню|наступну)? ?\] ?dddd/).test(format) ?
60
+ 'accusative' :
61
+ 'nominative';
62
+
63
+ return weekdays[nounCase][m.day()];
64
+ }
65
+
66
+ require('../moment').lang('uk', {
67
+ months : monthsCaseReplace,
68
+ monthsShort : "січ_лют_бер_кві_тра_чер_лип_сер_вер_жов_лис_гру".split("_"),
69
+ weekdays : weekdaysCaseReplace,
70
+ weekdaysShort : "нед_пон_вів_срд_чет_птн_суб".split("_"),
71
+ weekdaysMin : "нд_пн_вт_ср_чт_пт_сб".split("_"),
72
+ longDateFormat : {
73
+ LT : "HH:mm",
74
+ L : "DD.MM.YYYY",
75
+ LL : "D MMMM YYYY г.",
76
+ LLL : "D MMMM YYYY г., LT",
77
+ LLLL : "dddd, D MMMM YYYY г., LT"
78
+ },
79
+ calendar : {
80
+ sameDay: '[Сьогодні в] LT',
81
+ nextDay: '[Завтра в] LT',
82
+ lastDay: '[Вчора в] LT',
83
+ nextWeek: function () {
84
+ return this.day() === 2 ? '[У] dddd [в] LT' : '[В] dddd [в] LT';
85
+ },
86
+ lastWeek: function () {
87
+ switch (this.day()) {
88
+ case 0:
89
+ case 3:
90
+ case 5:
91
+ case 6:
92
+ return '[В минулу] dddd [в] LT';
93
+ case 1:
94
+ case 2:
95
+ case 4:
96
+ return '[В минулий] dddd [в] LT';
97
+ }
98
+ },
99
+ sameElse: 'L'
100
+ },
101
+ // It needs checking (adding) ukrainan plurals and cases.
102
+ relativeTime : {
103
+ future : "через %s",
104
+ past : "%s тому",
105
+ s : "декілька секунд",
106
+ m : relativeTimeWithPlural,
107
+ mm : relativeTimeWithPlural,
108
+ h : "годину",
109
+ hh : relativeTimeWithPlural,
110
+ d : "день",
111
+ dd : relativeTimeWithPlural,
112
+ M : "місяць",
113
+ MM : relativeTimeWithPlural,
114
+ y : "рік",
115
+ yy : relativeTimeWithPlural
116
+ },
117
+ ordinal : '%d.',
118
+ week : {
119
+ dow : 1, // Monday is the first day of the week.
120
+ doy : 7 // The week that contains Jan 1st is the first week of the year.
121
+ }
122
+ });
@@ -1,67 +1,58 @@
1
1
  // moment.js language configuration
2
2
  // language : chinese
3
3
  // author : suupic : https://github.com/suupic
4
- (function () {
5
- var lang = {
6
- months : "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
7
- monthsShort : "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
8
- weekdays : "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
9
- weekdaysShort : "周日_周一_周二_周三_周四_周五_周六".split("_"),
10
- weekdaysMin : "日_一_二_三_四_五_六".split("_"),
11
- longDateFormat : {
12
- LT : "Ah点mm",
13
- L : "YYYY年MMMD日",
14
- LL : "YYYY年MMMD日",
15
- LLL : "YYYY年MMMD日LT",
16
- LLLL : "YYYY年MMMD日ddddLT"
17
- },
18
- meridiem : function (hour, minute, isLower) {
19
- if (hour < 9) {
20
- return "早上";
21
- } else if (hour < 11 && minute < 30) {
22
- return "上午";
23
- } else if (hour < 13 && minute < 30) {
24
- return "中午";
25
- } else if (hour < 18) {
26
- return "下午";
27
- } else {
28
- return "晚上";
29
- }
30
- },
31
- calendar : {
32
- sameDay : '[今天]LT',
33
- nextDay : '[明天]LT',
34
- nextWeek : '[下]ddddLT',
35
- lastDay : '[昨天]LT',
36
- lastWeek : '[上]ddddLT',
37
- sameElse : 'L'
38
- },
39
- relativeTime : {
40
- future : "%s内",
41
- past : "%s前",
42
- s : "几秒",
43
- m : "1分钟",
44
- mm : "%d分钟",
45
- h : "1小时",
46
- hh : "%d小时",
47
- d : "1天",
48
- dd : "%d天",
49
- M : "1个月",
50
- MM : "%d个月",
51
- y : "1年",
52
- yy : "%d年"
53
- },
54
- ordinal : function (number) {
55
- return '';
56
- }
57
- };
58
4
 
59
- // Node
60
- if (typeof module !== 'undefined' && module.exports) {
61
- module.exports = lang;
5
+ require('../moment').lang('zh-cn', {
6
+ months : "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
7
+ monthsShort : "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
8
+ weekdays : "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
9
+ weekdaysShort : "周日_周一_周二_周三_周四_周五_周六".split("_"),
10
+ weekdaysMin : "日_一_二_三_四_五_六".split("_"),
11
+ longDateFormat : {
12
+ LT : "Ah点mm",
13
+ L : "YYYY年MMMD日",
14
+ LL : "YYYY年MMMD日",
15
+ LLL : "YYYY年MMMD日LT",
16
+ LLLL : "YYYY年MMMD日ddddLT",
17
+ l : "YYYY年MMMD日",
18
+ ll : "YYYY年MMMD日",
19
+ lll : "YYYY年MMMD日LT",
20
+ llll : "YYYY年MMMD日ddddLT"
21
+ },
22
+ meridiem : function (hour, minute, isLower) {
23
+ if (hour < 9) {
24
+ return "早上";
25
+ } else if (hour < 11 && minute < 30) {
26
+ return "上午";
27
+ } else if (hour < 13 && minute < 30) {
28
+ return "中午";
29
+ } else if (hour < 18) {
30
+ return "下午";
31
+ } else {
32
+ return "晚上";
33
+ }
34
+ },
35
+ calendar : {
36
+ sameDay : '[今天]LT',
37
+ nextDay : '[明天]LT',
38
+ nextWeek : '[下]ddddLT',
39
+ lastDay : '[昨天]LT',
40
+ lastWeek : '[上]ddddLT',
41
+ sameElse : 'L'
42
+ },
43
+ relativeTime : {
44
+ future : "%s内",
45
+ past : "%s前",
46
+ s : "几秒",
47
+ m : "1分钟",
48
+ mm : "%d分钟",
49
+ h : "1小时",
50
+ hh : "%d小时",
51
+ d : "1天",
52
+ dd : "%d天",
53
+ M : "1个月",
54
+ MM : "%d个月",
55
+ y : "1年",
56
+ yy : "%d年"
62
57
  }
63
- // Browser
64
- if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
65
- this.moment.lang('zh-cn', lang);
66
- }
67
- }());
58
+ });