LaravelTest
111 строк · 3.7 Кб
1//! moment.js locale configuration
2//! locale : Chinese (Macau) [zh-mo]
3//! author : Ben : https://github.com/ben-lin
4//! author : Chris Lam : https://github.com/hehachris
5//! author : Tan Yuanhong : https://github.com/le0tan
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 zhMo = moment.defineLocale('zh-mo', {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: 'DD/MM/YYYY',30LL: 'YYYY年M月D日',31LLL: 'YYYY年M月D日 HH:mm',32LLLL: 'YYYY年M月D日dddd HH:mm',33l: 'D/M/YYYY',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 === '中午') {46return hour >= 11 ? hour : hour + 12;47} else if (meridiem === '下午' || meridiem === '晚上') {48return hour + 12;49}50},51meridiem: function (hour, minute, isLower) {52var hm = hour * 100 + minute;53if (hm < 600) {54return '凌晨';55} else if (hm < 900) {56return '早上';57} else if (hm < 1130) {58return '上午';59} else if (hm < 1230) {60return '中午';61} else if (hm < 1800) {62return '下午';63} else {64return '晚上';65}66},67calendar: {68sameDay: '[今天] LT',69nextDay: '[明天] LT',70nextWeek: '[下]dddd LT',71lastDay: '[昨天] LT',72lastWeek: '[上]dddd LT',73sameElse: 'L',74},75dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,76ordinal: function (number, period) {77switch (period) {78case 'd':79case 'D':80case 'DDD':81return number + '日';82case 'M':83return number + '月';84case 'w':85case 'W':86return number + '週';87default:88return number;89}90},91relativeTime: {92future: '%s內',93past: '%s前',94s: '幾秒',95ss: '%d 秒',96m: '1 分鐘',97mm: '%d 分鐘',98h: '1 小時',99hh: '%d 小時',100d: '1 天',101dd: '%d 天',102M: '1 個月',103MM: '%d 個月',104y: '1 年',105yy: '%d 年',106},107});108
109return zhMo;110
111})));112