cscg24-guacamole

CSCG 2024 Challenge 'Guacamole Mashup'
git clone https://git.sinitax.com/sinitax/cscg24-guacamole
Log | Files | Refs | sfeed.txt

zh-cn.js (4507B)


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