Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

zh-cn.js 3.2KB

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