diff options
| author | 2015-08-26 07:57:23 -0300 | |
|---|---|---|
| committer | 2015-08-26 07:57:23 -0300 | |
| commit | 70ceb871117ca811d63cb02671dc0fefc2700883 (patch) | |
| tree | 846133ea39797d2cd1101cff2ac0818167353490 /bower_components/moment/src/lib/units/year.js | |
| parent | 8559119e2f45b7f6508282962c0430423bfab051 (diff) | |
| parent | 787b97a4cb24330b36f11297c6d3a7a473a907d0 (diff) | |
Merge tag 'upstream/7.6.4'
Upstream version 7.6.4
Diffstat (limited to 'bower_components/moment/src/lib/units/year.js')
| -rw-r--r-- | bower_components/moment/src/lib/units/year.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bower_components/moment/src/lib/units/year.js b/bower_components/moment/src/lib/units/year.js index 4d8a03b..cc32b55 100644 --- a/bower_components/moment/src/lib/units/year.js +++ b/bower_components/moment/src/lib/units/year.js @@ -29,7 +29,10 @@ addRegexToken('YYYY', match1to4, match4); addRegexToken('YYYYY', match1to6, match6); addRegexToken('YYYYYY', match1to6, match6); -addParseToken(['YYYY', 'YYYYY', 'YYYYYY'], YEAR); +addParseToken(['YYYYY', 'YYYYYY'], YEAR); +addParseToken('YYYY', function (input, array) { + array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); +}); addParseToken('YY', function (input, array) { array[YEAR] = hooks.parseTwoDigitYear(input); }); @@ -57,4 +60,3 @@ export var getSetYear = makeGetSet('FullYear', false); export function getIsLeapYear () { return isLeapYear(this.year()); } - |
