momentjs-rails 2.5.0 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 26eb8540bc610de37cf2c7e9e69de07878cc0af0
4
- data.tar.gz: 7c4d2fa1f0f2ab5f324aaff5741a3ce4ce2543ae
3
+ metadata.gz: 8ffc0df24aa2481e08dab21e728556e7b033cced
4
+ data.tar.gz: 9d2331f2cb0461b057674fee2f5d88800ef41064
5
5
  SHA512:
6
- metadata.gz: dab238e9515fdbdea5e8cdca93307e2412f3984368a83ecf85541ecaff8c7c080c19de90595ee7991ef711a3795d67564272c85fd6e38dde34ce87428bcce34f
7
- data.tar.gz: efa50aa5bb9cf93b0573cc712cc9db6ea375ecd3f3aa3d8b04c6aaf90c9241b9a4a64aa1f5ef2a73bb2c97cc7489d217e144b5883dd7373106f0b252ce500823
6
+ metadata.gz: 2d1a718cec1a1e8a3d3cb6e4ac029828fd2c90065b4e9f7eced087768e1ddc102d8ad5d3977c2aa15fcf8342d72d8c71bfe47bbd1eb730639f9d0c36929bb2f3
7
+ data.tar.gz: 9088633ef53a3d3c54fed3e761a4832c815903bda205aba388d606dda92043ddd55317d838eaf903b2873edef6a4f4400b35f81727b189563e23fca19ed1a923
data/README.md CHANGED
@@ -24,7 +24,7 @@ If you want to include a localization file, also add the following directive:
24
24
 
25
25
  ## Versioning
26
26
 
27
- momentjs-rails 2.5.0 == Moment.js 2.5.0
27
+ momentjs-rails 2.5.1 == Moment.js 2.5.1
28
28
 
29
29
  Every attempt is made to mirror the currently shipping Momentum.js version number wherever possible.
30
30
  The major, minor, and patch version numbers will always represent the Momentum.js version. Should a gem
data/news.md CHANGED
@@ -1,3 +1,6 @@
1
+ ### Version 2.5.1 (2014-01-28)
2
+ - Updated to Moment.js to 2.5.1
3
+
1
4
  ### Version 2.5.0 (2014-01-05)
2
5
  - Updated to Moment.js to 2.5.0
3
6
 
@@ -1,28 +1,15 @@
1
- Started GET "/assets/moment.js" for 127.0.0.1 at 2013-09-19 11:00:54 -0400
2
- Compiled moment.js (0ms) (pid 11385)
1
+ Started GET "/assets/moment.js" for 127.0.0.1 at 2014-01-05 09:28:54 +0100
2
+ Compiled moment.js (1ms) (pid 56387)
3
3
  Served asset /moment.js - 200 OK (6ms)
4
- Started GET "/assets/moment/fr.js" for 127.0.0.1 at 2013-09-19 11:00:54 -0400
5
- Compiled moment/fr.js (0ms) (pid 11385)
6
- Served asset /moment/fr.js - 200 OK (23ms)
7
- Started GET "/assets/moment.js" for 127.0.0.1 at 2013-09-19 11:00:54 -0400
8
- Served asset /moment.js - 200 OK (0ms)
9
- Started GET "/assets/moment.js" for 127.0.0.1 at 2013-09-19 11:01:37 -0400
10
- Served asset /moment.js - 200 OK (11ms)
11
- Started GET "/assets/moment/fr.js" for 127.0.0.1 at 2013-09-19 11:01:37 -0400
12
- Served asset /moment/fr.js - 200 OK (1ms)
13
- Started GET "/assets/moment.js" for 127.0.0.1 at 2013-09-19 11:01:37 -0400
14
- Served asset /moment.js - 200 OK (0ms)
15
- Started GET "/assets/moment.js" for 127.0.0.1 at 2013-09-19 11:02:11 -0400
16
- Served asset /moment.js - 200 OK (2ms)
17
- Started GET "/assets/moment/fr.js" for 127.0.0.1 at 2013-09-19 11:02:11 -0400
18
- Served asset /moment/fr.js - 200 OK (1ms)
19
- Started GET "/assets/moment.js" for 127.0.0.1 at 2013-09-19 11:02:11 -0400
20
- Served asset /moment.js - 200 OK (0ms)
21
- Started GET "/assets/moment.js" for 127.0.0.1 at 2014-01-09 09:25:18 -0500
22
- Compiled moment.js (1ms) (pid 4859)
23
- Served asset /moment.js - 200 OK (10ms)
24
- Started GET "/assets/moment/fr.js" for 127.0.0.1 at 2014-01-09 09:25:18 -0500
25
- Compiled moment/fr.js (0ms) (pid 4859)
4
+ Started GET "/assets/moment/fr.js" for 127.0.0.1 at 2014-01-05 09:28:54 +0100
5
+ Compiled moment/fr.js (0ms) (pid 56387)
26
6
  Served asset /moment/fr.js - 200 OK (4ms)
27
- Started GET "/assets/moment.js" for 127.0.0.1 at 2014-01-09 09:25:18 -0500
7
+ Started GET "/assets/moment.js" for 127.0.0.1 at 2014-01-05 09:28:54 +0100
8
+ Served asset /moment.js - 200 OK (0ms)
9
+ Started GET "/assets/moment.js" for 127.0.0.1 at 2014-01-28 12:36:31 +0100
10
+ Compiled moment.js (1ms) (pid 21871)
11
+ Served asset /moment.js - 200 OK (21ms)
12
+ Started GET "/assets/moment/fr.js" for 127.0.0.1 at 2014-01-28 12:36:31 +0100
13
+ Served asset /moment/fr.js - 200 OK (3ms)
14
+ Started GET "/assets/moment.js" for 127.0.0.1 at 2014-01-28 12:36:31 +0100
28
15
  Served asset /moment.js - 200 OK (0ms)
@@ -8,7 +8,7 @@ class NavigationTest < ActionDispatch::IntegrationTest
8
8
 
9
9
  test 'momentjs response is for the expected version' do
10
10
  get 'assets/moment.js'
11
- assert_match(/VERSION = "2\.5\.0"/, @response.body)
11
+ assert_match(/VERSION = "2\.5\.1"/, @response.body)
12
12
  end
13
13
 
14
14
  test 'can access momentjs translation' do
@@ -1,5 +1,5 @@
1
1
  //! moment.js
2
- //! version : 2.5.0
2
+ //! version : 2.5.1
3
3
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
4
4
  //! license : MIT
5
5
  //! momentjs.com
@@ -11,7 +11,7 @@
11
11
  ************************************/
12
12
 
13
13
  var moment,
14
- VERSION = "2.5.0",
14
+ VERSION = "2.5.1",
15
15
  global = this,
16
16
  round = Math.round,
17
17
  i,
@@ -27,6 +27,19 @@
27
27
  // internal storage for language config files
28
28
  languages = {},
29
29
 
30
+ // moment internal properties
31
+ momentProperties = {
32
+ _isAMomentObject: null,
33
+ _i : null,
34
+ _f : null,
35
+ _l : null,
36
+ _strict : null,
37
+ _isUTC : null,
38
+ _offset : null, // optional. Combine with _isUTC
39
+ _pf : null,
40
+ _lang : null // optional
41
+ },
42
+
30
43
  // check for nodeJS
31
44
  hasModule = (typeof module !== 'undefined' && module.exports && typeof require !== 'undefined'),
32
45
 
@@ -58,19 +71,21 @@
58
71
  parseTokenTwoDigits = /\d\d/, // 00 - 99
59
72
  parseTokenThreeDigits = /\d{3}/, // 000 - 999
60
73
  parseTokenFourDigits = /\d{4}/, // 0000 - 9999
61
- parseTokenSixDigits = /[+\-]?\d{6}/, // -999,999 - 999,999
74
+ parseTokenSixDigits = /[+-]?\d{6}/, // -999,999 - 999,999
75
+ parseTokenSignedNumber = /[+-]?\d+/, // -inf - inf
62
76
 
63
77
  // iso 8601 regex
64
78
  // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
65
- isoRegex = /^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
79
+ isoRegex = /^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
66
80
 
67
81
  isoFormat = 'YYYY-MM-DDTHH:mm:ssZ',
68
82
 
69
83
  isoDates = [
70
- 'YYYY-MM-DD',
71
- 'GGGG-[W]WW',
72
- 'GGGG-[W]WW-E',
73
- 'YYYY-DDD'
84
+ ['YYYYYY-MM-DD', /[+-]\d{6}-\d{2}-\d{2}/],
85
+ ['YYYY-MM-DD', /\d{4}-\d{2}-\d{2}/],
86
+ ['GGGG-[W]WW-E', /\d{4}-W\d{2}-\d/],
87
+ ['GGGG-[W]WW', /\d{4}-W\d{2}/],
88
+ ['YYYY-DDD', /\d{4}-\d{3}/]
74
89
  ],
75
90
 
76
91
  // iso time formats and regexes
@@ -180,7 +195,7 @@
180
195
  return leftZeroFill(this.weekYear() % 100, 2);
181
196
  },
182
197
  gggg : function () {
183
- return this.weekYear();
198
+ return leftZeroFill(this.weekYear(), 4);
184
199
  },
185
200
  ggggg : function () {
186
201
  return leftZeroFill(this.weekYear(), 5);
@@ -189,7 +204,7 @@
189
204
  return leftZeroFill(this.isoWeekYear() % 100, 2);
190
205
  },
191
206
  GGGG : function () {
192
- return this.isoWeekYear();
207
+ return leftZeroFill(this.isoWeekYear(), 4);
193
208
  },
194
209
  GGGGG : function () {
195
210
  return leftZeroFill(this.isoWeekYear(), 5);
@@ -264,6 +279,23 @@
264
279
 
265
280
  lists = ['months', 'monthsShort', 'weekdays', 'weekdaysShort', 'weekdaysMin'];
266
281
 
282
+ function defaultParsingFlags() {
283
+ // We need to deep clone this object, and es5 standard is not very
284
+ // helpful.
285
+ return {
286
+ empty : false,
287
+ unusedTokens : [],
288
+ unusedInput : [],
289
+ overflow : -2,
290
+ charsLeftOver : 0,
291
+ nullInput : false,
292
+ invalidMonth : null,
293
+ invalidFormat : false,
294
+ userInvalidated : false,
295
+ iso: false
296
+ };
297
+ }
298
+
267
299
  function padToken(func, count) {
268
300
  return function (a) {
269
301
  return leftZeroFill(func.call(this, a), count);
@@ -355,6 +387,17 @@
355
387
  return a;
356
388
  }
357
389
 
390
+ function cloneMoment(m) {
391
+ var result = {}, i;
392
+ for (i in m) {
393
+ if (m.hasOwnProperty(i) && momentProperties.hasOwnProperty(i)) {
394
+ result[i] = m[i];
395
+ }
396
+ }
397
+
398
+ return result;
399
+ }
400
+
358
401
  function absRound(number) {
359
402
  if (number < 0) {
360
403
  return Math.ceil(number);
@@ -366,7 +409,7 @@
366
409
  // left zero fill a number
367
410
  // see http://jsperf.com/left-zero-filling for performance comparison
368
411
  function leftZeroFill(number, targetLength, forceSign) {
369
- var output = Math.abs(number) + '',
412
+ var output = '' + Math.abs(number),
370
413
  sign = number >= 0;
371
414
 
372
415
  while (output.length < targetLength) {
@@ -546,21 +589,6 @@
546
589
  }
547
590
  }
548
591
 
549
- function initializeParsingFlags(config) {
550
- config._pf = {
551
- empty : false,
552
- unusedTokens : [],
553
- unusedInput : [],
554
- overflow : -2,
555
- charsLeftOver : 0,
556
- nullInput : false,
557
- invalidMonth : null,
558
- invalidFormat : false,
559
- userInvalidated : false,
560
- iso: false
561
- };
562
- }
563
-
564
592
  function isValid(m) {
565
593
  if (m._isValid == null) {
566
594
  m._isValid = !isNaN(m._d.getTime()) &&
@@ -929,6 +957,10 @@
929
957
  case 'GGGG':
930
958
  case 'gggg':
931
959
  return strict ? parseTokenFourDigits : parseTokenOneToFourDigits;
960
+ case 'Y':
961
+ case 'G':
962
+ case 'g':
963
+ return parseTokenSignedNumber;
932
964
  case 'YYYYYY':
933
965
  case 'YYYYY':
934
966
  case 'GGGGG':
@@ -941,8 +973,10 @@
941
973
  if (strict) { return parseTokenTwoDigits; }
942
974
  /* falls through */
943
975
  case 'SSS':
976
+ if (strict) { return parseTokenThreeDigits; }
977
+ /* falls through */
944
978
  case 'DDD':
945
- return strict ? parseTokenThreeDigits : parseTokenOneToThreeDigits;
979
+ return parseTokenOneToThreeDigits;
946
980
  case 'MMM':
947
981
  case 'MMMM':
948
982
  case 'dd':
@@ -984,7 +1018,7 @@
984
1018
  case 'W':
985
1019
  case 'e':
986
1020
  case 'E':
987
- return strict ? parseTokenOneDigit : parseTokenOneOrTwoDigits;
1021
+ return parseTokenOneOrTwoDigits;
988
1022
  default :
989
1023
  a = new RegExp(regexpEscape(unescapeFormat(token.replace('\\', '')), "i"));
990
1024
  return a;
@@ -1315,7 +1349,7 @@
1315
1349
  for (i = 0; i < config._f.length; i++) {
1316
1350
  currentScore = 0;
1317
1351
  tempConfig = extend({}, config);
1318
- initializeParsingFlags(tempConfig);
1352
+ tempConfig._pf = defaultParsingFlags();
1319
1353
  tempConfig._f = config._f[i];
1320
1354
  makeDateFromStringAndFormat(tempConfig);
1321
1355
 
@@ -1342,20 +1376,20 @@
1342
1376
 
1343
1377
  // date from iso format
1344
1378
  function makeDateFromString(config) {
1345
- var i,
1379
+ var i, l,
1346
1380
  string = config._i,
1347
1381
  match = isoRegex.exec(string);
1348
1382
 
1349
1383
  if (match) {
1350
1384
  config._pf.iso = true;
1351
- for (i = 4; i > 0; i--) {
1352
- if (match[i]) {
1385
+ for (i = 0, l = isoDates.length; i < l; i++) {
1386
+ if (isoDates[i][1].exec(string)) {
1353
1387
  // match[5] should be "T" or undefined
1354
- config._f = isoDates[i - 1] + (match[6] || " ");
1388
+ config._f = isoDates[i][0] + (match[6] || " ");
1355
1389
  break;
1356
1390
  }
1357
1391
  }
1358
- for (i = 0; i < 4; i++) {
1392
+ for (i = 0, l = isoTimes.length; i < l; i++) {
1359
1393
  if (isoTimes[i][1].exec(string)) {
1360
1394
  config._f += isoTimes[i][0];
1361
1395
  break;
@@ -1496,14 +1530,10 @@
1496
1530
 
1497
1531
  //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
1498
1532
  function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) {
1499
- // The only solid way to create an iso date from year is to use
1500
- // a string format (Date.UTC handles only years > 1900). Don't ask why
1501
- // it doesn't need Z at the end.
1502
- var d = new Date(leftZeroFill(year, 6, true) + '-01-01').getUTCDay(),
1503
- daysToAdd, dayOfYear;
1533
+ var d = makeUTCDate(year, 0, 1).getUTCDay(), daysToAdd, dayOfYear;
1504
1534
 
1505
1535
  weekday = weekday != null ? weekday : firstDayOfWeek;
1506
- daysToAdd = firstDayOfWeek - d + (d > firstDayOfWeekOfYear ? 7 : 0);
1536
+ daysToAdd = firstDayOfWeek - d + (d > firstDayOfWeekOfYear ? 7 : 0) - (d < firstDayOfWeek ? 7 : 0);
1507
1537
  dayOfYear = 7 * (week - 1) + (weekday - firstDayOfWeek) + daysToAdd + 1;
1508
1538
 
1509
1539
  return {
@@ -1520,10 +1550,6 @@
1520
1550
  var input = config._i,
1521
1551
  format = config._f;
1522
1552
 
1523
- if (typeof config._pf === 'undefined') {
1524
- initializeParsingFlags(config);
1525
- }
1526
-
1527
1553
  if (input === null) {
1528
1554
  return moment.invalid({nullInput: true});
1529
1555
  }
@@ -1533,7 +1559,7 @@
1533
1559
  }
1534
1560
 
1535
1561
  if (moment.isMoment(input)) {
1536
- config = extend({}, input);
1562
+ config = cloneMoment(input);
1537
1563
 
1538
1564
  config._d = new Date(+input._d);
1539
1565
  } else if (format) {
@@ -1550,37 +1576,47 @@
1550
1576
  }
1551
1577
 
1552
1578
  moment = function (input, format, lang, strict) {
1579
+ var c;
1580
+
1553
1581
  if (typeof(lang) === "boolean") {
1554
1582
  strict = lang;
1555
1583
  lang = undefined;
1556
1584
  }
1557
- return makeMoment({
1558
- _i : input,
1559
- _f : format,
1560
- _l : lang,
1561
- _strict : strict,
1562
- _isUTC : false
1563
- });
1585
+ // object construction must be done this way.
1586
+ // https://github.com/moment/moment/issues/1423
1587
+ c = {};
1588
+ c._isAMomentObject = true;
1589
+ c._i = input;
1590
+ c._f = format;
1591
+ c._l = lang;
1592
+ c._strict = strict;
1593
+ c._isUTC = false;
1594
+ c._pf = defaultParsingFlags();
1595
+
1596
+ return makeMoment(c);
1564
1597
  };
1565
1598
 
1566
1599
  // creating with utc
1567
1600
  moment.utc = function (input, format, lang, strict) {
1568
- var m;
1601
+ var c;
1569
1602
 
1570
1603
  if (typeof(lang) === "boolean") {
1571
1604
  strict = lang;
1572
1605
  lang = undefined;
1573
1606
  }
1574
- m = makeMoment({
1575
- _useUTC : true,
1576
- _isUTC : true,
1577
- _l : lang,
1578
- _i : input,
1579
- _f : format,
1580
- _strict : strict
1581
- }).utc();
1582
-
1583
- return m;
1607
+ // object construction must be done this way.
1608
+ // https://github.com/moment/moment/issues/1423
1609
+ c = {};
1610
+ c._isAMomentObject = true;
1611
+ c._useUTC = true;
1612
+ c._isUTC = true;
1613
+ c._l = lang;
1614
+ c._i = input;
1615
+ c._f = format;
1616
+ c._strict = strict;
1617
+ c._pf = defaultParsingFlags();
1618
+
1619
+ return makeMoment(c).utc();
1584
1620
  };
1585
1621
 
1586
1622
  // creating with unix timestamp (in seconds)
@@ -1690,7 +1726,8 @@
1690
1726
 
1691
1727
  // compare moment object
1692
1728
  moment.isMoment = function (obj) {
1693
- return obj instanceof Moment;
1729
+ return obj instanceof Moment ||
1730
+ (obj != null && obj.hasOwnProperty('_isAMomentObject'));
1694
1731
  };
1695
1732
 
1696
1733
  // for typechecking Duration objects
@@ -12,10 +12,10 @@
12
12
  }
13
13
  }(function (moment) {
14
14
  return moment.lang('ca', {
15
- months : "Gener_Febrer_Març_Abril_Maig_Juny_Juliol_Agost_Setembre_Octubre_Novembre_Desembre".split("_"),
16
- monthsShort : "Gen._Febr._Mar._Abr._Mai._Jun._Jul._Ag._Set._Oct._Nov._Des.".split("_"),
17
- weekdays : "Diumenge_Dilluns_Dimarts_Dimecres_Dijous_Divendres_Dissabte".split("_"),
18
- weekdaysShort : "Dg._Dl._Dt._Dc._Dj._Dv._Ds.".split("_"),
15
+ months : "gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),
16
+ monthsShort : "gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.".split("_"),
17
+ weekdays : "diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),
18
+ weekdaysShort : "dg._dl._dt._dc._dj._dv._ds.".split("_"),
19
19
  weekdaysMin : "Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),
20
20
  longDateFormat : {
21
21
  LT : "H:mm",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  relativeTime: {
37
37
  future: "mewn %s",
38
- past: "%s yn &#244;l",
38
+ past: "%s yn àl",
39
39
  s: "ychydig eiliadau",
40
40
  m: "munud",
41
41
  mm: "%d munud",
@@ -0,0 +1,113 @@
1
+ // moment.js language configuration
2
+ // language : Armenian (hy-am)
3
+ // author : Armendarabyan : https://github.com/armendarabyan
4
+
5
+ (function (factory) {
6
+ if (typeof define === 'function' && define.amd) {
7
+ define(['moment'], factory); // AMD
8
+ } else if (typeof exports === 'object') {
9
+ module.exports = factory(require('../moment')); // Node
10
+ } else {
11
+ factory(window.moment); // Browser global
12
+ }
13
+ }(function (moment) {
14
+
15
+ function monthsCaseReplace(m, format) {
16
+ var months = {
17
+ 'nominative': 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split('_'),
18
+ 'accusative': 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split('_')
19
+ },
20
+
21
+ nounCase = (/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/).test(format) ?
22
+ 'accusative' :
23
+ 'nominative';
24
+
25
+ return months[nounCase][m.month()];
26
+ }
27
+
28
+ function monthsShortCaseReplace(m, format) {
29
+ var monthsShort = 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_');
30
+
31
+ return monthsShort[m.month()];
32
+ }
33
+
34
+ function weekdaysCaseReplace(m, format) {
35
+ var weekdays = 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split('_');
36
+
37
+ return weekdays[m.day()];
38
+ }
39
+
40
+ return moment.lang('hy-am', {
41
+ months : monthsCaseReplace,
42
+ monthsShort : monthsShortCaseReplace,
43
+ weekdays : weekdaysCaseReplace,
44
+ weekdaysShort : "կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),
45
+ weekdaysMin : "կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),
46
+ longDateFormat : {
47
+ LT : "HH:mm",
48
+ L : "DD.MM.YYYY",
49
+ LL : "D MMMM YYYY թ.",
50
+ LLL : "D MMMM YYYY թ., LT",
51
+ LLLL : "dddd, D MMMM YYYY թ., LT"
52
+ },
53
+ calendar : {
54
+ sameDay: '[այսօր] LT',
55
+ nextDay: '[վաղը] LT',
56
+ lastDay: '[երեկ] LT',
57
+ nextWeek: function () {
58
+ return 'dddd [օրը ժամը] LT';
59
+ },
60
+ lastWeek: function () {
61
+ return '[անցած] dddd [օրը ժամը] LT';
62
+ },
63
+ sameElse: 'L'
64
+ },
65
+ relativeTime : {
66
+ future : "%s հետո",
67
+ past : "%s առաջ",
68
+ s : "մի քանի վայրկյան",
69
+ m : "րոպե",
70
+ mm : "%d րոպե",
71
+ h : "ժամ",
72
+ hh : "%d ժամ",
73
+ d : "օր",
74
+ dd : "%d օր",
75
+ M : "ամիս",
76
+ MM : "%d ամիս",
77
+ y : "տարի",
78
+ yy : "%d տարի"
79
+ },
80
+
81
+ meridiem : function (hour) {
82
+ if (hour < 4) {
83
+ return "գիշերվա";
84
+ } else if (hour < 12) {
85
+ return "առավոտվա";
86
+ } else if (hour < 17) {
87
+ return "ցերեկվա";
88
+ } else {
89
+ return "երեկոյան";
90
+ }
91
+ },
92
+
93
+ ordinal: function (number, period) {
94
+ switch (period) {
95
+ case 'DDD':
96
+ case 'w':
97
+ case 'W':
98
+ case 'DDDo':
99
+ if (number === 1) {
100
+ return number + '-ին';
101
+ }
102
+ return number + '-րդ';
103
+ default:
104
+ return number;
105
+ }
106
+ },
107
+
108
+ week : {
109
+ dow : 1, // Monday is the first day of the week.
110
+ doy : 7 // The week that contains Jan 1st is the first week of the year.
111
+ }
112
+ });
113
+ }));
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: momentjs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Prior
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-09 00:00:00.000000000 Z
11
+ date: 2014-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -76,6 +76,7 @@ files:
76
76
  - vendor/assets/javascripts/moment/hi.js
77
77
  - vendor/assets/javascripts/moment/hr.js
78
78
  - vendor/assets/javascripts/moment/hu.js
79
+ - vendor/assets/javascripts/moment/hy-am.js
79
80
  - vendor/assets/javascripts/moment/id.js
80
81
  - vendor/assets/javascripts/moment/is.js
81
82
  - vendor/assets/javascripts/moment/it.js
@@ -135,12 +136,12 @@ files:
135
136
  - test/dummy/config.ru
136
137
  - test/dummy/log/test.log
137
138
  - test/dummy/Rakefile
138
- - test/dummy/tmp/cache/assets/D1C/680/sprockets%2F16ed4d5afdb2919596e6f8790e2116c2
139
- - test/dummy/tmp/cache/assets/D35/CA0/sprockets%2F493e64bce2d302801dc01cf7cd096a58
140
- - test/dummy/tmp/cache/assets/D3F/5F0/sprockets%2F4a6c53eae7c6e41a69a191578bbb6417
141
- - test/dummy/tmp/cache/assets/D58/BD0/sprockets%2F4de9ddc9b725c715a54c98697b2528fe
142
- - test/dummy/tmp/cache/assets/D75/510/sprockets%2Fe690787ac522f47a6be024bfcc1767ee
143
- - test/dummy/tmp/cache/assets/E10/250/sprockets%2Fe4badb9ddfda484eb9671bf88567be61
139
+ - test/dummy/tmp/cache/assets/C4B/F20/sprockets%2F2a0b419661537b349a21d41ba3988990
140
+ - test/dummy/tmp/cache/assets/D46/140/sprockets%2F547811dd40877ace277331ae79ec4efa
141
+ - test/dummy/tmp/cache/assets/D4E/220/sprockets%2F8f4a628d82d9413ed7c75e8b373c9ab2
142
+ - test/dummy/tmp/cache/assets/D70/7B0/sprockets%2F28ee037740c82f4b2d895db4fb4a27cc
143
+ - test/dummy/tmp/cache/assets/DF2/E30/sprockets%2F655dba52b71aafead92214b8d4f15dfb
144
+ - test/dummy/tmp/cache/assets/E2B/3C0/sprockets%2Fd3a4fe71f7e32ca82bfabb6d7ef41f34
144
145
  - test/integration/navigation_test.rb
145
146
  - test/momentjs-rails_test.rb
146
147
  - test/test_helper.rb
@@ -164,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
165
  version: '0'
165
166
  requirements: []
166
167
  rubyforge_project:
167
- rubygems_version: 2.0.2
168
+ rubygems_version: 2.1.11
168
169
  signing_key:
169
170
  specification_version: 4
170
171
  summary: The Moment.js JavaScript library ready to play with Rails.
@@ -186,12 +187,12 @@ test_files:
186
187
  - test/dummy/config.ru
187
188
  - test/dummy/log/test.log
188
189
  - test/dummy/Rakefile
189
- - test/dummy/tmp/cache/assets/D1C/680/sprockets%2F16ed4d5afdb2919596e6f8790e2116c2
190
- - test/dummy/tmp/cache/assets/D35/CA0/sprockets%2F493e64bce2d302801dc01cf7cd096a58
191
- - test/dummy/tmp/cache/assets/D3F/5F0/sprockets%2F4a6c53eae7c6e41a69a191578bbb6417
192
- - test/dummy/tmp/cache/assets/D58/BD0/sprockets%2F4de9ddc9b725c715a54c98697b2528fe
193
- - test/dummy/tmp/cache/assets/D75/510/sprockets%2Fe690787ac522f47a6be024bfcc1767ee
194
- - test/dummy/tmp/cache/assets/E10/250/sprockets%2Fe4badb9ddfda484eb9671bf88567be61
190
+ - test/dummy/tmp/cache/assets/C4B/F20/sprockets%2F2a0b419661537b349a21d41ba3988990
191
+ - test/dummy/tmp/cache/assets/D46/140/sprockets%2F547811dd40877ace277331ae79ec4efa
192
+ - test/dummy/tmp/cache/assets/D4E/220/sprockets%2F8f4a628d82d9413ed7c75e8b373c9ab2
193
+ - test/dummy/tmp/cache/assets/D70/7B0/sprockets%2F28ee037740c82f4b2d895db4fb4a27cc
194
+ - test/dummy/tmp/cache/assets/DF2/E30/sprockets%2F655dba52b71aafead92214b8d4f15dfb
195
+ - test/dummy/tmp/cache/assets/E2B/3C0/sprockets%2Fd3a4fe71f7e32ca82bfabb6d7ef41f34
195
196
  - test/integration/navigation_test.rb
196
197
  - test/momentjs-rails_test.rb
197
198
  - test/test_helper.rb