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