cscg24-guacamole

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

zh-hk.js (3832B)


      1//! moment.js locale configuration
      2//! locale : Chinese (Hong Kong) [zh-hk]
      3//! author : Ben : https://github.com/ben-lin
      4//! author : Chris Lam : https://github.com/hehachris
      5//! author : Konstantin : https://github.com/skfd
      6//! author : Anthony : https://github.com/anthonylau
      7
      8;(function (global, factory) {
      9   typeof exports === 'object' && typeof module !== 'undefined'
     10       && typeof require === 'function' ? factory(require('../moment')) :
     11   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
     12   factory(global.moment)
     13}(this, (function (moment) { 'use strict';
     14
     15    //! moment.js locale configuration
     16
     17    var zhHk = moment.defineLocale('zh-hk', {
     18        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
     19            '_'
     20        ),
     21        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
     22            '_'
     23        ),
     24        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
     25        weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
     26        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
     27        longDateFormat: {
     28            LT: 'HH:mm',
     29            LTS: 'HH:mm:ss',
     30            L: 'YYYY/MM/DD',
     31            LL: 'YYYY年M月D日',
     32            LLL: 'YYYY年M月D日 HH:mm',
     33            LLLL: 'YYYY年M月D日dddd HH:mm',
     34            l: 'YYYY/M/D',
     35            ll: 'YYYY年M月D日',
     36            lll: 'YYYY年M月D日 HH:mm',
     37            llll: 'YYYY年M月D日dddd HH:mm',
     38        },
     39        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
     40        meridiemHour: function (hour, meridiem) {
     41            if (hour === 12) {
     42                hour = 0;
     43            }
     44            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
     45                return hour;
     46            } else if (meridiem === '中午') {
     47                return hour >= 11 ? hour : hour + 12;
     48            } else if (meridiem === '下午' || meridiem === '晚上') {
     49                return 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 < 1200) {
     59                return '上午';
     60            } else if (hm === 1200) {
     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: '[下]ddddLT',
     72            lastDay: '[昨天]LT',
     73            lastWeek: '[上]ddddLT',
     74            sameElse: 'L',
     75        },
     76        dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
     77        ordinal: function (number, period) {
     78            switch (period) {
     79                case 'd':
     80                case 'D':
     81                case 'DDD':
     82                    return number + '日';
     83                case 'M':
     84                    return number + '月';
     85                case 'w':
     86                case 'W':
     87                    return number + '週';
     88                default:
     89                    return number;
     90            }
     91        },
     92        relativeTime: {
     93            future: '%s後',
     94            past: '%s前',
     95            s: '幾秒',
     96            ss: '%d 秒',
     97            m: '1 分鐘',
     98            mm: '%d 分鐘',
     99            h: '1 小時',
    100            hh: '%d 小時',
    101            d: '1 天',
    102            dd: '%d 天',
    103            M: '1 個月',
    104            MM: '%d 個月',
    105            y: '1 年',
    106            yy: '%d 年',
    107        },
    108    });
    109
    110    return zhHk;
    111
    112})));