Node-Red configuration
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 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. // Chinese (China) [zh-cn]
  2. import dayjs from '../index';
  3. var locale = {
  4. name: 'zh-cn',
  5. weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  6. weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
  7. weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
  8. months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
  9. monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  10. ordinal: function ordinal(number, period) {
  11. switch (period) {
  12. case 'W':
  13. return number + "\u5468";
  14. default:
  15. return number + "\u65E5";
  16. }
  17. },
  18. weekStart: 1,
  19. yearStart: 4,
  20. formats: {
  21. LT: 'HH:mm',
  22. LTS: 'HH:mm:ss',
  23. L: 'YYYY/MM/DD',
  24. LL: 'YYYY年M月D日',
  25. LLL: 'YYYY年M月D日Ah点mm分',
  26. LLLL: 'YYYY年M月D日ddddAh点mm分',
  27. l: 'YYYY/M/D',
  28. ll: 'YYYY年M月D日',
  29. lll: 'YYYY年M月D日 HH:mm',
  30. llll: 'YYYY年M月D日dddd HH:mm'
  31. },
  32. relativeTime: {
  33. future: '%s内',
  34. past: '%s前',
  35. s: '几秒',
  36. m: '1 分钟',
  37. mm: '%d 分钟',
  38. h: '1 小时',
  39. hh: '%d 小时',
  40. d: '1 天',
  41. dd: '%d 天',
  42. M: '1 个月',
  43. MM: '%d 个月',
  44. y: '1 年',
  45. yy: '%d 年'
  46. },
  47. meridiem: function meridiem(hour, minute) {
  48. var hm = hour * 100 + minute;
  49. if (hm < 600) {
  50. return '凌晨';
  51. } else if (hm < 900) {
  52. return '早上';
  53. } else if (hm < 1100) {
  54. return '上午';
  55. } else if (hm < 1300) {
  56. return '中午';
  57. } else if (hm < 1800) {
  58. return '下午';
  59. }
  60. return '晚上';
  61. }
  62. };
  63. dayjs.locale(locale, null, true);
  64. export default locale;