From: Matt Johnson Date: Thu, 10 Mar 2016 03:50:36 +0000 (-0800) Subject: Fix issue with DST transition in Chinese locale X-Git-Tag: 2.13.0~9^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d367f561150926f4fdaa1ce95741f7ee134af27;p=thirdparty%2Fmoment.git Fix issue with DST transition in Chinese locale --- diff --git a/src/locale/zh-cn.js b/src/locale/zh-cn.js index 790ea8bc3..d9db71730 100644 --- a/src/locale/zh-cn.js +++ b/src/locale/zh-cn.js @@ -67,7 +67,7 @@ export default moment.defineLocale('zh-cn', { nextWeek : function () { var startOfWeek, prefix; startOfWeek = moment().startOf('week'); - prefix = this.unix() - startOfWeek.unix() >= 7 * 24 * 3600 ? '[下]' : '[本]'; + prefix = this.diff(startOfWeek, 'days') >= 7 ? '[下]' : '[本]'; return this.minutes() === 0 ? prefix + 'dddAh点整' : prefix + 'dddAh点mm'; }, lastWeek : function () {