Debian Codegraph @

resources/lib/moment/locale/zh-cn.js

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