vi.js 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. // moment.js locale configuration
  2. // locale : vietnamese (vi)
  3. // author : Bang Nguyen : https://github.com/bangnk
  4. (function (factory) {
  5. if (typeof define === 'function' && define.amd) {
  6. define(['moment'], factory); // AMD
  7. } else if (typeof exports === 'object') {
  8. module.exports = factory(require('../moment')); // Node
  9. } else {
  10. factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
  11. }
  12. }(function (moment) {
  13. return moment.defineLocale('vi', {
  14. months : 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'),
  15. monthsShort : 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'),
  16. weekdays : 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'),
  17. weekdaysShort : 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
  18. weekdaysMin : 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
  19. longDateFormat : {
  20. LT : 'HH:mm',
  21. LTS : 'LT:ss',
  22. L : 'DD/MM/YYYY',
  23. LL : 'D MMMM [năm] YYYY',
  24. LLL : 'D MMMM [năm] YYYY LT',
  25. LLLL : 'dddd, D MMMM [năm] YYYY LT',
  26. l : 'DD/M/YYYY',
  27. ll : 'D MMM YYYY',
  28. lll : 'D MMM YYYY LT',
  29. llll : 'ddd, D MMM YYYY LT'
  30. },
  31. calendar : {
  32. sameDay: '[Hôm nay lúc] LT',
  33. nextDay: '[Ngày mai lúc] LT',
  34. nextWeek: 'dddd [tuần tới lúc] LT',
  35. lastDay: '[Hôm qua lúc] LT',
  36. lastWeek: 'dddd [tuần rồi lúc] LT',
  37. sameElse: 'L'
  38. },
  39. relativeTime : {
  40. future : '%s tới',
  41. past : '%s trước',
  42. s : 'vài giây',
  43. m : 'một phút',
  44. mm : '%d phút',
  45. h : 'một giờ',
  46. hh : '%d giờ',
  47. d : 'một ngày',
  48. dd : '%d ngày',
  49. M : 'một tháng',
  50. MM : '%d tháng',
  51. y : 'một năm',
  52. yy : '%d năm'
  53. },
  54. ordinalParse: /\d{1,2}/,
  55. ordinal : function (number) {
  56. return number;
  57. },
  58. week : {
  59. dow : 1, // Monday is the first day of the week.
  60. doy : 4 // The week that contains Jan 4th is the first week of the year.
  61. }
  62. });
  63. }));