test/dummy/vendor/assets/components/moment/locale/zh-cn.js in date_picker-0.0.8 vs test/dummy/vendor/assets/components/moment/locale/zh-cn.js in date_picker-0.0.9
- old
+ new
@@ -1,13 +1,14 @@
//! moment.js locale configuration
-//! locale : chinese (zh-cn)
+//! locale : Chinese (China) [zh-cn]
//! author : suupic : https://github.com/suupic
//! author : Zeno Zeng : https://github.com/zenozeng
-(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('../moment')) :
- typeof define === 'function' && define.amd ? define(['moment'], factory) :
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, function (moment) { 'use strict';
var zh_cn = moment.defineLocale('zh-cn', {
@@ -70,11 +71,11 @@
return this.minutes() === 0 ? '[昨天]Ah[点整]' : '[昨天]LT';
},
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 () {
var startOfWeek, prefix;
startOfWeek = moment().startOf('week');
@@ -84,20 +85,20 @@
sameElse : 'LL'
},
ordinalParse: /\d{1,2}(日|月|周)/,
ordinal : function (number, period) {
switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return number + '日';
- case 'M':
- return number + '月';
- case 'w':
- case 'W':
- return number + '周';
- default:
- return number;
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ case 'M':
+ return number + '月';
+ case 'w':
+ case 'W':
+ return number + '周';
+ default:
+ return number;
}
},
relativeTime : {
future : '%s内',
past : '%s前',
\ No newline at end of file