Merge "Improve docs for Title::getInternalURL/getCanonicalURL"
[lhc/web/wiklou.git] / resources / lib / moment / locale / zh-cn.js
1 //! moment.js locale configuration
2
3 ;(function (global, factory) {
4 typeof exports === 'object' && typeof module !== 'undefined'
5 && typeof require === 'function' ? factory(require('../moment')) :
6 typeof define === 'function' && define.amd ? define(['../moment'], factory) :
7 factory(global.moment)
8 }(this, (function (moment) { 'use strict';
9
10
11 var zhCn = moment.defineLocale('zh-cn', {
12 months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
13 monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
14 weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
15 weekdaysShort : '周日_周一_周二_周三_周四_周五_周六'.split('_'),
16 weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
17 longDateFormat : {
18 LT : 'HH:mm',
19 LTS : 'HH:mm:ss',
20 L : 'YYYY/MM/DD',
21 LL : 'YYYY年M月D日',
22 LLL : 'YYYY年M月D日Ah点mm分',
23 LLLL : 'YYYY年M月D日ddddAh点mm分',
24 l : 'YYYY/M/D',
25 ll : 'YYYY年M月D日',
26 lll : 'YYYY年M月D日 HH:mm',
27 llll : 'YYYY年M月D日dddd HH:mm'
28 },
29 meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
30 meridiemHour: function (hour, meridiem) {
31 if (hour === 12) {
32 hour = 0;
33 }
34 if (meridiem === '凌晨' || meridiem === '早上' ||
35 meridiem === '上午') {
36 return hour;
37 } else if (meridiem === '下午' || meridiem === '晚上') {
38 return hour + 12;
39 } else {
40 // '中午'
41 return hour >= 11 ? hour : hour + 12;
42 }
43 },
44 meridiem : function (hour, minute, isLower) {
45 var hm = hour * 100 + minute;
46 if (hm < 600) {
47 return '凌晨';
48 } else if (hm < 900) {
49 return '早上';
50 } else if (hm < 1130) {
51 return '上午';
52 } else if (hm < 1230) {
53 return '中午';
54 } else if (hm < 1800) {
55 return '下午';
56 } else {
57 return '晚上';
58 }
59 },
60 calendar : {
61 sameDay : '[今天]LT',
62 nextDay : '[明天]LT',
63 nextWeek : '[下]ddddLT',
64 lastDay : '[昨天]LT',
65 lastWeek : '[上]ddddLT',
66 sameElse : 'L'
67 },
68 dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
69 ordinal : function (number, period) {
70 switch (period) {
71 case 'd':
72 case 'D':
73 case 'DDD':
74 return number + '日';
75 case 'M':
76 return number + '月';
77 case 'w':
78 case 'W':
79 return number + '周';
80 default:
81 return number;
82 }
83 },
84 relativeTime : {
85 future : '%s内',
86 past : '%s前',
87 s : '几秒',
88 ss : '%d 秒',
89 m : '1 分钟',
90 mm : '%d 分钟',
91 h : '1 小时',
92 hh : '%d 小时',
93 d : '1 天',
94 dd : '%d 天',
95 M : '1 个月',
96 MM : '%d 个月',
97 y : '1 年',
98 yy : '%d 年'
99 },
100 week : {
101 // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
102 dow : 1, // Monday is the first day of the week.
103 doy : 4 // The week that contains Jan 4th is the first week of the year.
104 }
105 });
106
107 return zhCn;
108
109 })));