diff -Nru node-moment-2.22.1+ds/CHANGELOG.md node-moment-2.22.2+ds/CHANGELOG.md --- node-moment-2.22.1+ds/CHANGELOG.md 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/CHANGELOG.md 2018-06-01 06:45:43.000000000 +0000 @@ -1,6 +1,14 @@ Changelog ========= +### 2.22.2 [See full changelog](https://gist.github.com/marwahaha/4d992c13c2dbc0f59d4d8acae1dc6d3a) + +* Release May 31, 2018 + +* [#4564](https://github.com/moment/moment/pull/4564) [bugfix] Avoid using trim() +* [#4453](https://github.com/moment/moment/pull/4453) [bugfix] Treat periods as periods, not regex-anything period, for weekday parsing in strict mode. +* Minor locale improvements (pa-in, be, az) + ### 2.22.1 [See full changelog](https://gist.github.com/marwahaha/ff2cd13d0eda08afb7a237b10aae558c) * Release Apr 14, 2018 diff -Nru node-moment-2.22.1+ds/component.json node-moment-2.22.2+ds/component.json --- node-moment-2.22.1+ds/component.json 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/component.json 2018-06-01 06:45:43.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "moment", - "version": "2.22.1", + "version": "2.22.2", "main": "moment.js", "description": "Parse, validate, manipulate, and display dates in JavaScript.", "files": [ diff -Nru node-moment-2.22.1+ds/debian/changelog node-moment-2.22.2+ds/debian/changelog --- node-moment-2.22.1+ds/debian/changelog 2018-04-26 09:59:05.000000000 +0000 +++ node-moment-2.22.2+ds/debian/changelog 2018-06-19 21:46:53.000000000 +0000 @@ -1,3 +1,9 @@ +node-moment (2.22.2+ds-1) unstable; urgency=medium + + * New upstream release. + + -- Julien Puydt Tue, 19 Jun 2018 23:46:53 +0200 + node-moment (2.22.1+ds-1) unstable; urgency=medium * New upstream release. diff -Nru node-moment-2.22.1+ds/debian/control node-moment-2.22.2+ds/debian/control --- node-moment-2.22.1+ds/debian/control 2018-04-26 09:59:05.000000000 +0000 +++ node-moment-2.22.2+ds/debian/control 2018-06-19 21:46:53.000000000 +0000 @@ -2,7 +2,7 @@ Section: javascript Priority: optional Maintainer: Debian Javascript Maintainers -Uploaders: Julien Puydt +Uploaders: Julien Puydt Build-Depends: debhelper (>= 11), nodejs, uglifyjs Standards-Version: 4.1.4 Homepage: https://github.com/moment/moment diff -Nru node-moment-2.22.1+ds/locale/az.js node-moment-2.22.2+ds/locale/az.js --- node-moment-2.22.1+ds/locale/az.js 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/locale/az.js 2018-06-01 06:45:43.000000000 +0000 @@ -55,7 +55,7 @@ relativeTime : { future : '%s sonra', past : '%s əvvəl', - s : 'birneçə saniyyə', + s : 'birneçə saniyə', ss : '%d saniyə', m : 'bir dəqiqə', mm : '%d dəqiqə', diff -Nru node-moment-2.22.1+ds/locale/be.js node-moment-2.22.2+ds/locale/be.js --- node-moment-2.22.1+ds/locale/be.js 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/locale/be.js 2018-06-01 06:45:43.000000000 +0000 @@ -41,7 +41,7 @@ weekdays : { format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_'), standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'), - isFormat: /\[ ?[Вв] ?(?:мінулую|наступную)? ?\] ?dddd/ + isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/ }, weekdaysShort : 'нд_пн_ат_ср_чц_пт_сб'.split('_'), weekdaysMin : 'нд_пн_ат_ср_чц_пт_сб'.split('_'), diff -Nru node-moment-2.22.1+ds/locale/pa-in.js node-moment-2.22.2+ds/locale/pa-in.js --- node-moment-2.22.1+ds/locale/pa-in.js 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/locale/pa-in.js 2018-06-01 06:45:43.000000000 +0000 @@ -51,7 +51,7 @@ calendar : { sameDay : '[ਅਜ] LT', nextDay : '[ਕਲ] LT', - nextWeek : 'dddd, LT', + nextWeek : '[ਅਗਲਾ] dddd, LT', lastDay : '[ਕਲ] LT', lastWeek : '[ਪਿਛਲੇ] dddd, LT', sameElse : 'L' diff -Nru node-moment-2.22.1+ds/meteor/moment.js node-moment-2.22.2+ds/meteor/moment.js --- node-moment-2.22.1+ds/meteor/moment.js 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/meteor/moment.js 2018-06-01 06:45:43.000000000 +0000 @@ -1472,9 +1472,9 @@ mom = createUTC([2000, 1]).day(i); if (strict && !this._fullWeekdaysParse[i]) { - this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i'); - this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i'); - this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i'); + this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i'); + this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i'); + this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i'); } if (!this._weekdaysParse[i]) { regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); @@ -2277,7 +2277,7 @@ function preprocessRFC2822(s) { // Remove comments and folding whitespace and replace multiple-spaces with a single space - return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').trim(); + return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); } function checkWeekday(weekdayStr, parsedInput, config) { @@ -4456,7 +4456,7 @@ // Side effect imports - hooks.version = '2.22.1'; + hooks.version = '2.22.2'; setHookCallback(createLocal); diff -Nru node-moment-2.22.1+ds/meteor/package.js node-moment-2.22.2+ds/meteor/package.js --- node-moment-2.22.1+ds/meteor/package.js 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/meteor/package.js 2018-06-01 06:45:43.000000000 +0000 @@ -6,7 +6,7 @@ Package.describe({ name: packageName, summary: 'Moment.js (official): parse, validate, manipulate, and display dates - official Meteor packaging', - version: '2.22.1', + version: '2.22.2', git: 'https://github.com/moment/moment.git' }); diff -Nru node-moment-2.22.1+ds/min/locales.js node-moment-2.22.2+ds/min/locales.js --- node-moment-2.22.1+ds/min/locales.js 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/min/locales.js 2018-06-01 06:45:43.000000000 +0000 @@ -628,7 +628,7 @@ relativeTime : { future : '%s sonra', past : '%s əvvəl', - s : 'birneçə saniyyə', + s : 'birneçə saniyə', ss : '%d saniyə', m : 'bir dəqiqə', mm : '%d dəqiqə', @@ -707,7 +707,7 @@ weekdays : { format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_'), standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'), - isFormat: /\[ ?[Вв] ?(?:мінулую|наступную)? ?\] ?dddd/ + isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/ }, weekdaysShort : 'нд_пн_ат_ср_чц_пт_сб'.split('_'), weekdaysMin : 'нд_пн_ат_ср_чц_пт_сб'.split('_'), @@ -5919,7 +5919,7 @@ //! moment.js locale configuration - var symbolMap$10 = { + var symbolMap$a = { '1': '१', '2': '२', '3': '३', @@ -6028,7 +6028,7 @@ }, postformat: function (string) { return string.replace(/\d/g, function (match) { - return symbolMap$10[match]; + return symbolMap$a[match]; }); }, meridiemParse: /रात्री|सकाळी|दुपारी|सायंकाळी/, @@ -6255,7 +6255,7 @@ //! moment.js locale configuration - var symbolMap$11 = { + var symbolMap$b = { '1': '၁', '2': '၂', '3': '၃', @@ -6266,7 +6266,7 @@ '8': '၈', '9': '၉', '0': '၀' - }, numberMap$10 = { + }, numberMap$a = { '၁': '1', '၂': '2', '၃': '3', @@ -6320,12 +6320,12 @@ }, preparse: function (string) { return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) { - return numberMap$10[match]; + return numberMap$a[match]; }); }, postformat: function (string) { return string.replace(/\d/g, function (match) { - return symbolMap$11[match]; + return symbolMap$b[match]; }); }, week: { @@ -6386,7 +6386,7 @@ //! moment.js locale configuration - var symbolMap$12 = { + var symbolMap$c = { '1': '१', '2': '२', '3': '३', @@ -6398,7 +6398,7 @@ '9': '९', '0': '०' }, - numberMap$11 = { + numberMap$b = { '१': '1', '२': '2', '३': '3', @@ -6429,12 +6429,12 @@ }, preparse: function (string) { return string.replace(/[१२३४५६७८९०]/g, function (match) { - return numberMap$11[match]; + return numberMap$b[match]; }); }, postformat: function (string) { return string.replace(/\d/g, function (match) { - return symbolMap$12[match]; + return symbolMap$c[match]; }); }, meridiemParse: /राति|बिहान|दिउँसो|साँझ/, @@ -6695,7 +6695,7 @@ //! moment.js locale configuration - var symbolMap$13 = { + var symbolMap$d = { '1': '੧', '2': '੨', '3': '੩', @@ -6707,7 +6707,7 @@ '9': '੯', '0': '੦' }, - numberMap$12 = { + numberMap$c = { '੧': '1', '੨': '2', '੩': '3', @@ -6738,7 +6738,7 @@ calendar : { sameDay : '[ਅਜ] LT', nextDay : '[ਕਲ] LT', - nextWeek : 'dddd, LT', + nextWeek : '[ਅਗਲਾ] dddd, LT', lastDay : '[ਕਲ] LT', lastWeek : '[ਪਿਛਲੇ] dddd, LT', sameElse : 'L' @@ -6761,12 +6761,12 @@ }, preparse: function (string) { return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) { - return numberMap$12[match]; + return numberMap$c[match]; }); }, postformat: function (string) { return string.replace(/\d/g, function (match) { - return symbolMap$13[match]; + return symbolMap$d[match]; }); }, // Punjabi notation for meridiems are quite fuzzy in practice. While there exists @@ -8188,7 +8188,7 @@ //! moment.js locale configuration - var symbolMap$14 = { + var symbolMap$e = { '1': '௧', '2': '௨', '3': '௩', @@ -8199,7 +8199,7 @@ '8': '௮', '9': '௯', '0': '௦' - }, numberMap$13 = { + }, numberMap$d = { '௧': '1', '௨': '2', '௩': '3', @@ -8256,12 +8256,12 @@ }, preparse: function (string) { return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) { - return numberMap$13[match]; + return numberMap$d[match]; }); }, postformat: function (string) { return string.replace(/\d/g, function (match) { - return symbolMap$14[match]; + return symbolMap$e[match]; }); }, // refer http://ta.wikipedia.org/s/1er1 @@ -8672,7 +8672,7 @@ return time; } - function translate$10(number, withoutSuffix, string, isFuture) { + function translate$a(number, withoutSuffix, string, isFuture) { var numberNoun = numberAsNoun(number); switch (string) { case 'ss': @@ -8734,17 +8734,17 @@ future : translateFuture, past : translatePast, s : 'puS lup', - ss : translate$10, + ss : translate$a, m : 'wa’ tup', - mm : translate$10, + mm : translate$a, h : 'wa’ rep', - hh : translate$10, + hh : translate$a, d : 'wa’ jaj', - dd : translate$10, + dd : translate$a, M : 'wa’ jar', - MM : translate$10, + MM : translate$a, y : 'wa’ DIS', - yy : translate$10 + yy : translate$a }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', diff -Nru node-moment-2.22.1+ds/min/moment-with-locales.js node-moment-2.22.2+ds/min/moment-with-locales.js --- node-moment-2.22.1+ds/min/moment-with-locales.js 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/min/moment-with-locales.js 2018-06-01 06:45:43.000000000 +0000 @@ -1470,9 +1470,9 @@ mom = createUTC([2000, 1]).day(i); if (strict && !this._fullWeekdaysParse[i]) { - this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i'); - this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i'); - this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i'); + this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i'); + this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i'); + this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i'); } if (!this._weekdaysParse[i]) { regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); @@ -2275,7 +2275,7 @@ function preprocessRFC2822(s) { // Remove comments and folding whitespace and replace multiple-spaces with a single space - return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').trim(); + return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); } function checkWeekday(weekdayStr, parsedInput, config) { @@ -4455,7 +4455,7 @@ //! moment.js - hooks.version = '2.22.1'; + hooks.version = '2.22.2'; setHookCallback(createLocal); @@ -5123,7 +5123,7 @@ relativeTime : { future : '%s sonra', past : '%s əvvəl', - s : 'birneçə saniyyə', + s : 'birneçə saniyə', ss : '%d saniyə', m : 'bir dəqiqə', mm : '%d dəqiqə', @@ -5202,7 +5202,7 @@ weekdays : { format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_'), standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'), - isFormat: /\[ ?[Вв] ?(?:мінулую|наступную)? ?\] ?dddd/ + isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/ }, weekdaysShort : 'нд_пн_ат_ср_чц_пт_сб'.split('_'), weekdaysMin : 'нд_пн_ат_ср_чц_пт_сб'.split('_'), @@ -10410,7 +10410,7 @@ //! moment.js locale configuration - var symbolMap$10 = { + var symbolMap$a = { '1': '१', '2': '२', '3': '३', @@ -10519,7 +10519,7 @@ }, postformat: function (string) { return string.replace(/\d/g, function (match) { - return symbolMap$10[match]; + return symbolMap$a[match]; }); }, meridiemParse: /रात्री|सकाळी|दुपारी|सायंकाळी/, @@ -10746,7 +10746,7 @@ //! moment.js locale configuration - var symbolMap$11 = { + var symbolMap$b = { '1': '၁', '2': '၂', '3': '၃', @@ -10757,7 +10757,7 @@ '8': '၈', '9': '၉', '0': '၀' - }, numberMap$10 = { + }, numberMap$a = { '၁': '1', '၂': '2', '၃': '3', @@ -10811,12 +10811,12 @@ }, preparse: function (string) { return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) { - return numberMap$10[match]; + return numberMap$a[match]; }); }, postformat: function (string) { return string.replace(/\d/g, function (match) { - return symbolMap$11[match]; + return symbolMap$b[match]; }); }, week: { @@ -10877,7 +10877,7 @@ //! moment.js locale configuration - var symbolMap$12 = { + var symbolMap$c = { '1': '१', '2': '२', '3': '३', @@ -10889,7 +10889,7 @@ '9': '९', '0': '०' }, - numberMap$11 = { + numberMap$b = { '१': '1', '२': '2', '३': '3', @@ -10920,12 +10920,12 @@ }, preparse: function (string) { return string.replace(/[१२३४५६७८९०]/g, function (match) { - return numberMap$11[match]; + return numberMap$b[match]; }); }, postformat: function (string) { return string.replace(/\d/g, function (match) { - return symbolMap$12[match]; + return symbolMap$c[match]; }); }, meridiemParse: /राति|बिहान|दिउँसो|साँझ/, @@ -11186,7 +11186,7 @@ //! moment.js locale configuration - var symbolMap$13 = { + var symbolMap$d = { '1': '੧', '2': '੨', '3': '੩', @@ -11198,7 +11198,7 @@ '9': '੯', '0': '੦' }, - numberMap$12 = { + numberMap$c = { '੧': '1', '੨': '2', '੩': '3', @@ -11229,7 +11229,7 @@ calendar : { sameDay : '[ਅਜ] LT', nextDay : '[ਕਲ] LT', - nextWeek : 'dddd, LT', + nextWeek : '[ਅਗਲਾ] dddd, LT', lastDay : '[ਕਲ] LT', lastWeek : '[ਪਿਛਲੇ] dddd, LT', sameElse : 'L' @@ -11252,12 +11252,12 @@ }, preparse: function (string) { return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) { - return numberMap$12[match]; + return numberMap$c[match]; }); }, postformat: function (string) { return string.replace(/\d/g, function (match) { - return symbolMap$13[match]; + return symbolMap$d[match]; }); }, // Punjabi notation for meridiems are quite fuzzy in practice. While there exists @@ -12679,7 +12679,7 @@ //! moment.js locale configuration - var symbolMap$14 = { + var symbolMap$e = { '1': '௧', '2': '௨', '3': '௩', @@ -12690,7 +12690,7 @@ '8': '௮', '9': '௯', '0': '௦' - }, numberMap$13 = { + }, numberMap$d = { '௧': '1', '௨': '2', '௩': '3', @@ -12747,12 +12747,12 @@ }, preparse: function (string) { return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) { - return numberMap$13[match]; + return numberMap$d[match]; }); }, postformat: function (string) { return string.replace(/\d/g, function (match) { - return symbolMap$14[match]; + return symbolMap$e[match]; }); }, // refer http://ta.wikipedia.org/s/1er1 @@ -13163,7 +13163,7 @@ return time; } - function translate$10(number, withoutSuffix, string, isFuture) { + function translate$a(number, withoutSuffix, string, isFuture) { var numberNoun = numberAsNoun(number); switch (string) { case 'ss': @@ -13225,17 +13225,17 @@ future : translateFuture, past : translatePast, s : 'puS lup', - ss : translate$10, + ss : translate$a, m : 'wa’ tup', - mm : translate$10, + mm : translate$a, h : 'wa’ rep', - hh : translate$10, + hh : translate$a, d : 'wa’ jaj', - dd : translate$10, + dd : translate$a, M : 'wa’ jar', - MM : translate$10, + MM : translate$a, y : 'wa’ DIS', - yy : translate$10 + yy : translate$a }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', diff -Nru node-moment-2.22.1+ds/min/tests.js node-moment-2.22.2+ds/min/tests.js --- node-moment-2.22.1+ds/min/tests.js 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/min/tests.js 2018-06-01 06:45:43.000000000 +0000 @@ -4258,7 +4258,7 @@ test('from', function (assert) { var start = moment([2007, 1, 28]); - assert.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), 'birneçə saniyyə', '44 seconds = a few seconds'); + assert.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), 'birneçə saniyə', '44 seconds = a few seconds'); assert.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), 'bir dəqiqə', '45 seconds = a minute'); assert.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), 'bir dəqiqə', '89 seconds = a minute'); assert.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), '2 dəqiqə', '90 seconds = 2 minutes'); @@ -4288,16 +4288,16 @@ }); test('suffix', function (assert) { - assert.equal(moment(30000).from(0), 'birneçə saniyyə sonra', 'prefix'); - assert.equal(moment(0).from(30000), 'birneçə saniyyə əvvəl', 'suffix'); + assert.equal(moment(30000).from(0), 'birneçə saniyə sonra', 'prefix'); + assert.equal(moment(0).from(30000), 'birneçə saniyə əvvəl', 'suffix'); }); test('now from now', function (assert) { - assert.equal(moment().fromNow(), 'birneçə saniyyə əvvəl', 'now from now should display as in the past'); + assert.equal(moment().fromNow(), 'birneçə saniyə əvvəl', 'now from now should display as in the past'); }); test('fromNow', function (assert) { - assert.equal(moment().add({s: 30}).fromNow(), 'birneçə saniyyə sonra', 'in a few seconds'); + assert.equal(moment().add({s: 30}).fromNow(), 'birneçə saniyə sonra', 'in a few seconds'); assert.equal(moment().add({d: 5}).fromNow(), '5 gün sonra', 'in 5 days'); }); @@ -4878,6 +4878,10 @@ assert.equal(moment([2012, 0, 9]).format('w ww wo'), '3 03 3-і', 'Jan 9 2012 should be week 3'); }); + test('calendar should format', function (assert) { + assert.equal(moment('2018-04-13').calendar(moment('2018-04-16')), 'У мінулую пятніцу ў 00:00', 'calendar should handle day of week'); + }); + }))); @@ -41159,11 +41163,11 @@ var i, m; for (i = 2; i < 7; i++) { m = moment().add({d: i}); - assert.equal(m.calendar(), m.format('dddd[,] LT'), 'Today + ' + i + ' days current time'); + assert.equal(m.calendar(), m.format('[ਅਗਲਾ] dddd[,] LT'), 'Today + ' + i + ' days current time'); m.hours(0).minutes(0).seconds(0).milliseconds(0); - assert.equal(m.calendar(), m.format('dddd[,] LT'), 'Today + ' + i + ' days beginning of day'); + assert.equal(m.calendar(), m.format('[ਅਗਲਾ] dddd[,] LT'), 'Today + ' + i + ' days beginning of day'); m.hours(23).minutes(59).seconds(59).milliseconds(999); - assert.equal(m.calendar(), m.format('dddd[,] LT'), 'Today + ' + i + ' days end of day'); + assert.equal(m.calendar(), m.format('[ਅਗਲਾ] dddd[,] LT'), 'Today + ' + i + ' days end of day'); } }); @@ -69035,6 +69039,39 @@ 'preserve global locale in case of bad locale id'); }); + test('when in strict mode with inexact parsing, treat periods in short weekdays literally, not as the regex-period', function (assert) { + moment.defineLocale('periods-in-short-weekdays', { + weekdays : 'Monday_Tuesday_Wednesday_Thursday_Friday_Saturday_Sunday'.split('_'), + weekdaysShort : 'mon_t...s_wed_thurs_fri_sat_sun'.split('_'), + weekdaysParseExact : false + }); + + moment().locale('periods-in-short-weekdays'); + assert.equal(moment('thurs', 'ddd', true).format('dddd'), 'Thursday'); + }); + + test('when in strict mode with inexact parsing, treat periods in full weekdays literally, not as the regex-period', function (assert) { + moment.defineLocale('periods-in-full-weekdays', { + weekdays : 'Monday_T....day_Wednesday_Thursday_Friday_Saturday_Sunday'.split('_'), + weekdaysShort : 'mon_tues_wed_thurs_fri_sat_sun'.split('_'), + weekdaysParseExact : false + }); + + moment().locale('periods-in-full-weekdays'); + assert.equal(moment('Thursday', 'dddd', true).format('ddd'), 'thurs'); + }); + + test('when in strict mode with inexact parsing, treat periods in min-weekdays literally, not as the regex-period', function (assert) { + moment.defineLocale('periods-in-min-weekdays', { + weekdays : 'Monday_Tuesday_Wednesday_Thursday_Friday_Saturday_Sunday'.split('_'), + weekdaysMin : 'mon_t...s_wed_thurs_fri_sat_sun'.split('_'), + weekdaysParseExact : false + }); + + moment().locale('periods-in-min-weekdays'); + assert.equal(moment('thurs', 'dd', true).format('dddd'), 'Thursday'); + }); + // TODO: Enable this after fixing pl months parse hack hack // test('monthsParseExact', function (assert) { @@ -71481,7 +71518,7 @@ assert.equal(m.date(), 2, 'keep the day'); assert.equal(m.hours(), 3, 'keep the hours'); assert.equal(m.minutes(), 4, 'keep the minutes'); - assert.equal(m.seconds(), 5, 'keep the the seconds'); + assert.equal(m.seconds(), 5, 'keep the seconds'); assert.equal(m.milliseconds(), 0, 'strip out the milliseconds'); }); @@ -73320,7 +73357,7 @@ test('day of year', function (assert) { assert.equal(moment([2000, 0, 1]).dayOfYear(), 1, 'Jan 1 2000 should be day 1 of the year'); assert.equal(moment([2000, 1, 28]).dayOfYear(), 59, 'Feb 28 2000 should be day 59 of the year'); - assert.equal(moment([2000, 1, 29]).dayOfYear(), 60, 'Feb 28 2000 should be day 60 of the year'); + assert.equal(moment([2000, 1, 29]).dayOfYear(), 60, 'Feb 29 2000 should be day 60 of the year'); assert.equal(moment([2000, 11, 31]).dayOfYear(), 366, 'Dec 31 2000 should be day 366 of the year'); assert.equal(moment([2001, 0, 1]).dayOfYear(), 1, 'Jan 1 2001 should be day 1 of the year'); assert.equal(moment([2001, 1, 28]).dayOfYear(), 59, 'Feb 28 2001 should be day 59 of the year'); @@ -73331,7 +73368,7 @@ test('day of year setters', function (assert) { assert.equal(moment([2000, 0, 1]).dayOfYear(200).dayOfYear(), 200, 'Setting Jan 1 2000 day of the year to 200 should work'); assert.equal(moment([2000, 1, 28]).dayOfYear(200).dayOfYear(), 200, 'Setting Feb 28 2000 day of the year to 200 should work'); - assert.equal(moment([2000, 1, 29]).dayOfYear(200).dayOfYear(), 200, 'Setting Feb 28 2000 day of the year to 200 should work'); + assert.equal(moment([2000, 1, 29]).dayOfYear(200).dayOfYear(), 200, 'Setting Feb 29 2000 day of the year to 200 should work'); assert.equal(moment([2000, 11, 31]).dayOfYear(200).dayOfYear(), 200, 'Setting Dec 31 2000 day of the year to 200 should work'); assert.equal(moment().dayOfYear(1).dayOfYear(), 1, 'Setting day of the year to 1 should work'); assert.equal(moment().dayOfYear(59).dayOfYear(), 59, 'Setting day of the year to 59 should work'); diff -Nru node-moment-2.22.1+ds/moment.js node-moment-2.22.2+ds/moment.js --- node-moment-2.22.1+ds/moment.js 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/moment.js 2018-06-01 06:45:43.000000000 +0000 @@ -1472,9 +1472,9 @@ mom = createUTC([2000, 1]).day(i); if (strict && !this._fullWeekdaysParse[i]) { - this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i'); - this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i'); - this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i'); + this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i'); + this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i'); + this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i'); } if (!this._weekdaysParse[i]) { regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); @@ -2277,7 +2277,7 @@ function preprocessRFC2822(s) { // Remove comments and folding whitespace and replace multiple-spaces with a single space - return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').trim(); + return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); } function checkWeekday(weekdayStr, parsedInput, config) { @@ -4456,7 +4456,7 @@ // Side effect imports - hooks.version = '2.22.1'; + hooks.version = '2.22.2'; setHookCallback(createLocal); diff -Nru node-moment-2.22.1+ds/Moment.js.nuspec node-moment-2.22.2+ds/Moment.js.nuspec --- node-moment-2.22.1+ds/Moment.js.nuspec 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/Moment.js.nuspec 2018-06-01 06:45:43.000000000 +0000 @@ -2,16 +2,16 @@ Moment.js - 2.22.1 + 2.22.2 Tim Wood, Iskren Chernev, Moment.js contributors Cory Deppen, Iskren Chernev A lightweight JavaScript date library for parsing, manipulating, and formatting dates. - * Release Apr 14, 2018 + * Release May 31, 2018 - * [#4495](https://github.com/moment/moment/pull/4495) [bugfix] Added HTML5_FMT to moment.d.ts - * Minor locale improvements - * QUnit upgrade and coveralls reporting + * [#4564](https://github.com/moment/moment/pull/4564) [bugfix] Avoid using trim() + * [#4453](https://github.com/moment/moment/pull/4453) [bugfix] Treat periods as periods, not regex-anything period, for weekday parsing in strict mode. + * Minor locale improvements (pa-in, be, az) http://momentjs.com/ http://pbs.twimg.com/profile_images/482670411402858496/Xrtdc94q_normal.png diff -Nru node-moment-2.22.1+ds/package.json node-moment-2.22.2+ds/package.json --- node-moment-2.22.1+ds/package.json 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/package.json 2018-06-01 06:45:43.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "moment", - "version": "2.22.1", + "version": "2.22.2", "description": "Parse, validate, manipulate, and display dates", "homepage": "http://momentjs.com", "author": "Iskren Ivov Chernev (https://github.com/ichernev)", @@ -60,7 +60,7 @@ "karma-firefox-launcher": "latest", "karma-qunit": "latest", "karma-sauce-launcher": "latest", - "load-grunt-tasks": "latest", + "load-grunt-tasks": "~3.5.2", "node-qunit": "^1.0.0", "nyc": "^2.1.4", "qunit": "^2.6.0", diff -Nru node-moment-2.22.1+ds/src/lib/create/from-string.js node-moment-2.22.2+ds/src/lib/create/from-string.js --- node-moment-2.22.1+ds/src/lib/create/from-string.js 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/src/lib/create/from-string.js 2018-06-01 06:45:43.000000000 +0000 @@ -128,7 +128,7 @@ function preprocessRFC2822(s) { // Remove comments and folding whitespace and replace multiple-spaces with a single space - return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').trim(); + return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); } function checkWeekday(weekdayStr, parsedInput, config) { diff -Nru node-moment-2.22.1+ds/src/lib/units/day-of-week.js node-moment-2.22.2+ds/src/lib/units/day-of-week.js --- node-moment-2.22.1+ds/src/lib/units/day-of-week.js 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/src/lib/units/day-of-week.js 2018-06-01 06:45:43.000000000 +0000 @@ -200,9 +200,9 @@ mom = createUTC([2000, 1]).day(i); if (strict && !this._fullWeekdaysParse[i]) { - this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i'); - this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i'); - this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i'); + this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i'); + this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i'); + this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i'); } if (!this._weekdaysParse[i]) { regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); diff -Nru node-moment-2.22.1+ds/src/locale/az.js node-moment-2.22.2+ds/src/locale/az.js --- node-moment-2.22.1+ds/src/locale/az.js 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/src/locale/az.js 2018-06-01 06:45:43.000000000 +0000 @@ -51,7 +51,7 @@ relativeTime : { future : '%s sonra', past : '%s əvvəl', - s : 'birneçə saniyyə', + s : 'birneçə saniyə', ss : '%d saniyə', m : 'bir dəqiqə', mm : '%d dəqiqə', diff -Nru node-moment-2.22.1+ds/src/locale/be.js node-moment-2.22.2+ds/src/locale/be.js --- node-moment-2.22.1+ds/src/locale/be.js 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/src/locale/be.js 2018-06-01 06:45:43.000000000 +0000 @@ -39,7 +39,7 @@ weekdays : { format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_'), standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'), - isFormat: /\[ ?[Вв] ?(?:мінулую|наступную)? ?\] ?dddd/ + isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/ }, weekdaysShort : 'нд_пн_ат_ср_чц_пт_сб'.split('_'), weekdaysMin : 'нд_пн_ат_ср_чц_пт_сб'.split('_'), diff -Nru node-moment-2.22.1+ds/src/locale/pa-in.js node-moment-2.22.2+ds/src/locale/pa-in.js --- node-moment-2.22.1+ds/src/locale/pa-in.js 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/src/locale/pa-in.js 2018-06-01 06:45:43.000000000 +0000 @@ -47,7 +47,7 @@ calendar : { sameDay : '[ਅਜ] LT', nextDay : '[ਕਲ] LT', - nextWeek : 'dddd, LT', + nextWeek : '[ਅਗਲਾ] dddd, LT', lastDay : '[ਕਲ] LT', lastWeek : '[ਪਿਛਲੇ] dddd, LT', sameElse : 'L' diff -Nru node-moment-2.22.1+ds/src/moment.js node-moment-2.22.2+ds/src/moment.js --- node-moment-2.22.1+ds/src/moment.js 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/src/moment.js 2018-06-01 06:45:43.000000000 +0000 @@ -1,12 +1,12 @@ //! moment.js -//! version : 2.22.1 +//! version : 2.22.2 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com import { hooks as moment, setHookCallback } from './lib/utils/hooks'; -moment.version = '2.22.1'; +moment.version = '2.22.2'; import { min, diff -Nru node-moment-2.22.1+ds/src/test/locale/az.js node-moment-2.22.2+ds/src/test/locale/az.js --- node-moment-2.22.1+ds/src/test/locale/az.js 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/src/test/locale/az.js 2018-06-01 06:45:43.000000000 +0000 @@ -119,7 +119,7 @@ test('from', function (assert) { var start = moment([2007, 1, 28]); - assert.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), 'birneçə saniyyə', '44 seconds = a few seconds'); + assert.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), 'birneçə saniyə', '44 seconds = a few seconds'); assert.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), 'bir dəqiqə', '45 seconds = a minute'); assert.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), 'bir dəqiqə', '89 seconds = a minute'); assert.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), '2 dəqiqə', '90 seconds = 2 minutes'); @@ -149,16 +149,16 @@ }); test('suffix', function (assert) { - assert.equal(moment(30000).from(0), 'birneçə saniyyə sonra', 'prefix'); - assert.equal(moment(0).from(30000), 'birneçə saniyyə əvvəl', 'suffix'); + assert.equal(moment(30000).from(0), 'birneçə saniyə sonra', 'prefix'); + assert.equal(moment(0).from(30000), 'birneçə saniyə əvvəl', 'suffix'); }); test('now from now', function (assert) { - assert.equal(moment().fromNow(), 'birneçə saniyyə əvvəl', 'now from now should display as in the past'); + assert.equal(moment().fromNow(), 'birneçə saniyə əvvəl', 'now from now should display as in the past'); }); test('fromNow', function (assert) { - assert.equal(moment().add({s: 30}).fromNow(), 'birneçə saniyyə sonra', 'in a few seconds'); + assert.equal(moment().add({s: 30}).fromNow(), 'birneçə saniyə sonra', 'in a few seconds'); assert.equal(moment().add({d: 5}).fromNow(), '5 gün sonra', 'in 5 days'); }); diff -Nru node-moment-2.22.1+ds/src/test/locale/be.js node-moment-2.22.2+ds/src/test/locale/be.js --- node-moment-2.22.1+ds/src/test/locale/be.js 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/src/test/locale/be.js 2018-06-01 06:45:43.000000000 +0000 @@ -264,3 +264,6 @@ assert.equal(moment([2012, 0, 9]).format('w ww wo'), '3 03 3-і', 'Jan 9 2012 should be week 3'); }); +test('calendar should format', function (assert) { + assert.equal(moment('2018-04-13').calendar(moment('2018-04-16')), 'У мінулую пятніцу ў 00:00', 'calendar should handle day of week'); +}); diff -Nru node-moment-2.22.1+ds/src/test/locale/pa-in.js node-moment-2.22.2+ds/src/test/locale/pa-in.js --- node-moment-2.22.1+ds/src/test/locale/pa-in.js 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/src/test/locale/pa-in.js 2018-06-01 06:45:43.000000000 +0000 @@ -165,11 +165,11 @@ var i, m; for (i = 2; i < 7; i++) { m = moment().add({d: i}); - assert.equal(m.calendar(), m.format('dddd[,] LT'), 'Today + ' + i + ' days current time'); + assert.equal(m.calendar(), m.format('[ਅਗਲਾ] dddd[,] LT'), 'Today + ' + i + ' days current time'); m.hours(0).minutes(0).seconds(0).milliseconds(0); - assert.equal(m.calendar(), m.format('dddd[,] LT'), 'Today + ' + i + ' days beginning of day'); + assert.equal(m.calendar(), m.format('[ਅਗਲਾ] dddd[,] LT'), 'Today + ' + i + ' days beginning of day'); m.hours(23).minutes(59).seconds(59).milliseconds(999); - assert.equal(m.calendar(), m.format('dddd[,] LT'), 'Today + ' + i + ' days end of day'); + assert.equal(m.calendar(), m.format('[ਅਗਲਾ] dddd[,] LT'), 'Today + ' + i + ' days end of day'); } }); diff -Nru node-moment-2.22.1+ds/src/test/moment/locale.js node-moment-2.22.2+ds/src/test/moment/locale.js --- node-moment-2.22.1+ds/src/test/moment/locale.js 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/src/test/moment/locale.js 2018-06-01 06:45:43.000000000 +0000 @@ -471,6 +471,39 @@ 'preserve global locale in case of bad locale id'); }); +test('when in strict mode with inexact parsing, treat periods in short weekdays literally, not as the regex-period', function (assert) { + moment.defineLocale('periods-in-short-weekdays', { + weekdays : 'Monday_Tuesday_Wednesday_Thursday_Friday_Saturday_Sunday'.split('_'), + weekdaysShort : 'mon_t...s_wed_thurs_fri_sat_sun'.split('_'), + weekdaysParseExact : false + }); + + moment().locale('periods-in-short-weekdays'); + assert.equal(moment('thurs', 'ddd', true).format('dddd'), 'Thursday'); +}); + +test('when in strict mode with inexact parsing, treat periods in full weekdays literally, not as the regex-period', function (assert) { + moment.defineLocale('periods-in-full-weekdays', { + weekdays : 'Monday_T....day_Wednesday_Thursday_Friday_Saturday_Sunday'.split('_'), + weekdaysShort : 'mon_tues_wed_thurs_fri_sat_sun'.split('_'), + weekdaysParseExact : false + }); + + moment().locale('periods-in-full-weekdays'); + assert.equal(moment('Thursday', 'dddd', true).format('ddd'), 'thurs'); +}); + +test('when in strict mode with inexact parsing, treat periods in min-weekdays literally, not as the regex-period', function (assert) { + moment.defineLocale('periods-in-min-weekdays', { + weekdays : 'Monday_Tuesday_Wednesday_Thursday_Friday_Saturday_Sunday'.split('_'), + weekdaysMin : 'mon_t...s_wed_thurs_fri_sat_sun'.split('_'), + weekdaysParseExact : false + }); + + moment().locale('periods-in-min-weekdays'); + assert.equal(moment('thurs', 'dd', true).format('dddd'), 'Thursday'); +}); + // TODO: Enable this after fixing pl months parse hack hack // test('monthsParseExact', function (assert) { diff -Nru node-moment-2.22.1+ds/src/test/moment/start_end_of.js node-moment-2.22.2+ds/src/test/moment/start_end_of.js --- node-moment-2.22.1+ds/src/test/moment/start_end_of.js 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/src/test/moment/start_end_of.js 2018-06-01 06:45:43.000000000 +0000 @@ -289,7 +289,7 @@ assert.equal(m.date(), 2, 'keep the day'); assert.equal(m.hours(), 3, 'keep the hours'); assert.equal(m.minutes(), 4, 'keep the minutes'); - assert.equal(m.seconds(), 5, 'keep the the seconds'); + assert.equal(m.seconds(), 5, 'keep the seconds'); assert.equal(m.milliseconds(), 0, 'strip out the milliseconds'); }); diff -Nru node-moment-2.22.1+ds/src/test/moment/weeks.js node-moment-2.22.2+ds/src/test/moment/weeks.js --- node-moment-2.22.1+ds/src/test/moment/weeks.js 2018-04-15 05:53:50.000000000 +0000 +++ node-moment-2.22.2+ds/src/test/moment/weeks.js 2018-06-01 06:45:43.000000000 +0000 @@ -6,7 +6,7 @@ test('day of year', function (assert) { assert.equal(moment([2000, 0, 1]).dayOfYear(), 1, 'Jan 1 2000 should be day 1 of the year'); assert.equal(moment([2000, 1, 28]).dayOfYear(), 59, 'Feb 28 2000 should be day 59 of the year'); - assert.equal(moment([2000, 1, 29]).dayOfYear(), 60, 'Feb 28 2000 should be day 60 of the year'); + assert.equal(moment([2000, 1, 29]).dayOfYear(), 60, 'Feb 29 2000 should be day 60 of the year'); assert.equal(moment([2000, 11, 31]).dayOfYear(), 366, 'Dec 31 2000 should be day 366 of the year'); assert.equal(moment([2001, 0, 1]).dayOfYear(), 1, 'Jan 1 2001 should be day 1 of the year'); assert.equal(moment([2001, 1, 28]).dayOfYear(), 59, 'Feb 28 2001 should be day 59 of the year'); @@ -17,7 +17,7 @@ test('day of year setters', function (assert) { assert.equal(moment([2000, 0, 1]).dayOfYear(200).dayOfYear(), 200, 'Setting Jan 1 2000 day of the year to 200 should work'); assert.equal(moment([2000, 1, 28]).dayOfYear(200).dayOfYear(), 200, 'Setting Feb 28 2000 day of the year to 200 should work'); - assert.equal(moment([2000, 1, 29]).dayOfYear(200).dayOfYear(), 200, 'Setting Feb 28 2000 day of the year to 200 should work'); + assert.equal(moment([2000, 1, 29]).dayOfYear(200).dayOfYear(), 200, 'Setting Feb 29 2000 day of the year to 200 should work'); assert.equal(moment([2000, 11, 31]).dayOfYear(200).dayOfYear(), 200, 'Setting Dec 31 2000 day of the year to 200 should work'); assert.equal(moment().dayOfYear(1).dayOfYear(), 1, 'Setting day of the year to 1 should work'); assert.equal(moment().dayOfYear(59).dayOfYear(), 59, 'Setting day of the year to 59 should work');