]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
update test/lang/zh-cn.js, skip next week test if target is tomorrow 1224/head
authorZeno Zeng <zenoes@qq.com>
Sun, 27 Oct 2013 02:54:13 +0000 (10:54 +0800)
committerZeno Zeng <zenoes@qq.com>
Sun, 27 Oct 2013 02:54:13 +0000 (10:54 +0800)
test/lang/zh-cn.js

index bd3a0b988064b98a7618d554b9d181c1d2521568..572da290eebe3d1ed60e9a1823821a790397bf97 100644 (file)
@@ -201,6 +201,9 @@ exports["lang:zh-cn"] = {
             if (Math.abs(m.diff(today, 'days')) >= 7) {
                 continue;
             }
+            if (Math.abs(m.diff(today, 'days')) <= 1) {
+                continue; // skip today, yesterday, tomorrow
+            }
             test.equal(m.calendar(),  m.format('[下]ddd凌晨12点整'), "Today + " + i + " days beginning of day");
         }
         test.done();