Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

113 linhas
3.7KB

  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. ;(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. //! moment.js locale configuration
  14. var zhHk = moment.defineLocale('zh-hk', {
  15. months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
  16. '_'
  17. ),
  18. monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
  19. '_'
  20. ),
  21. weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  22. weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
  23. weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
  24. longDateFormat: {
  25. LT: 'HH:mm',
  26. LTS: 'HH:mm:ss',
  27. L: 'YYYY/MM/DD',
  28. LL: 'YYYY年M月D日',
  29. LLL: 'YYYY年M月D日 HH:mm',
  30. LLLL: 'YYYY年M月D日dddd HH:mm',
  31. l: 'YYYY/M/D',
  32. ll: 'YYYY年M月D日',
  33. lll: 'YYYY年M月D日 HH:mm',
  34. llll: 'YYYY年M月D日dddd HH:mm',
  35. },
  36. meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
  37. meridiemHour: function (hour, meridiem) {
  38. if (hour === 12) {
  39. hour = 0;
  40. }
  41. if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
  42. return hour;
  43. } else if (meridiem === '中午') {
  44. return hour >= 11 ? hour : hour + 12;
  45. } else if (meridiem === '下午' || meridiem === '晚上') {
  46. return hour + 12;
  47. }
  48. },
  49. meridiem: function (hour, minute, isLower) {
  50. var hm = hour * 100 + minute;
  51. if (hm < 600) {
  52. return '凌晨';
  53. } else if (hm < 900) {
  54. return '早上';
  55. } else if (hm < 1200) {
  56. return '上午';
  57. } else if (hm === 1200) {
  58. return '中午';
  59. } else if (hm < 1800) {
  60. return '下午';
  61. } else {
  62. return '晚上';
  63. }
  64. },
  65. calendar: {
  66. sameDay: '[今天]LT',
  67. nextDay: '[明天]LT',
  68. nextWeek: '[下]ddddLT',
  69. lastDay: '[昨天]LT',
  70. lastWeek: '[上]ddddLT',
  71. sameElse: 'L',
  72. },
  73. dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
  74. ordinal: function (number, period) {
  75. switch (period) {
  76. case 'd':
  77. case 'D':
  78. case 'DDD':
  79. return number + '日';
  80. case 'M':
  81. return number + '月';
  82. case 'w':
  83. case 'W':
  84. return number + '週';
  85. default:
  86. return number;
  87. }
  88. },
  89. relativeTime: {
  90. future: '%s後',
  91. past: '%s前',
  92. s: '幾秒',
  93. ss: '%d 秒',
  94. m: '1 分鐘',
  95. mm: '%d 分鐘',
  96. h: '1 小時',
  97. hh: '%d 小時',
  98. d: '1 天',
  99. dd: '%d 天',
  100. M: '1 個月',
  101. MM: '%d 個月',
  102. y: '1 年',
  103. yy: '%d 年',
  104. },
  105. });
  106. return zhHk;
  107. })));