From: Terrence Wong Date: Thu, 23 Apr 2020 15:04:18 +0000 (+0800) Subject: [bugfix] moment#5327 output wrong next week in ja locale (#5329) X-Git-Tag: 2.25.0~97 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff30dbe32299b727b693053e24075cde83ff34cc;p=thirdparty%2Fmoment.git [bugfix] moment#5327 output wrong next week in ja locale (#5329) * Fix moment#5327 output wrong next week string when in last week of the year in ja locale * Fix moment#5327 output wrong next week string when in next week of the year in ja locale --- diff --git a/src/locale/ja.js b/src/locale/ja.js index af3e1da01..a09b79a0c 100644 --- a/src/locale/ja.js +++ b/src/locale/ja.js @@ -37,7 +37,7 @@ export default moment.defineLocale('ja', { sameDay : '[今日] LT', nextDay : '[明日] LT', nextWeek : function (now) { - if (now.week() < this.week()) { + if (now.week() !== this.week()) { return '[来週]dddd LT'; } else { return 'dddd LT'; @@ -45,7 +45,7 @@ export default moment.defineLocale('ja', { }, lastDay : '[昨日] LT', lastWeek : function (now) { - if (this.week() < now.week()) { + if (this.week() !== now.week()) { return '[先週]dddd LT'; } else { return 'dddd LT';