dv.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. //! moment.js locale configuration
  2. //! locale : Maldivian [dv]
  3. //! author : Jawish Hameed : https://github.com/jawish
  4. import moment from '../moment';
  5. var months = [
  6. 'ޖެނުއަރީ',
  7. 'ފެބްރުއަރީ',
  8. 'މާރިޗު',
  9. 'އޭޕްރީލު',
  10. 'މޭ',
  11. 'ޖޫން',
  12. 'ޖުލައި',
  13. 'އޯގަސްޓު',
  14. 'ސެޕްޓެމްބަރު',
  15. 'އޮކްޓޯބަރު',
  16. 'ނޮވެމްބަރު',
  17. 'ޑިސެމްބަރު',
  18. ],
  19. weekdays = [
  20. 'އާދިއްތަ',
  21. 'ހޯމަ',
  22. 'އަންގާރަ',
  23. 'ބުދަ',
  24. 'ބުރާސްފަތި',
  25. 'ހުކުރު',
  26. 'ހޮނިހިރު',
  27. ];
  28. export default moment.defineLocale('dv', {
  29. months: months,
  30. monthsShort: months,
  31. weekdays: weekdays,
  32. weekdaysShort: weekdays,
  33. weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),
  34. longDateFormat: {
  35. LT: 'HH:mm',
  36. LTS: 'HH:mm:ss',
  37. L: 'D/M/YYYY',
  38. LL: 'D MMMM YYYY',
  39. LLL: 'D MMMM YYYY HH:mm',
  40. LLLL: 'dddd D MMMM YYYY HH:mm',
  41. },
  42. meridiemParse: /މކ|މފ/,
  43. isPM: function (input) {
  44. return 'މފ' === input;
  45. },
  46. meridiem: function (hour, minute, isLower) {
  47. if (hour < 12) {
  48. return 'މކ';
  49. } else {
  50. return 'މފ';
  51. }
  52. },
  53. calendar: {
  54. sameDay: '[މިއަދު] LT',
  55. nextDay: '[މާދަމާ] LT',
  56. nextWeek: 'dddd LT',
  57. lastDay: '[އިއްޔެ] LT',
  58. lastWeek: '[ފާއިތުވި] dddd LT',
  59. sameElse: 'L',
  60. },
  61. relativeTime: {
  62. future: 'ތެރޭގައި %s',
  63. past: 'ކުރިން %s',
  64. s: 'ސިކުންތުކޮޅެއް',
  65. ss: 'd% ސިކުންތު',
  66. m: 'މިނިޓެއް',
  67. mm: 'މިނިޓު %d',
  68. h: 'ގަޑިއިރެއް',
  69. hh: 'ގަޑިއިރު %d',
  70. d: 'ދުވަހެއް',
  71. dd: 'ދުވަސް %d',
  72. M: 'މަހެއް',
  73. MM: 'މަސް %d',
  74. y: 'އަހަރެއް',
  75. yy: 'އަހަރު %d',
  76. },
  77. preparse: function (string) {
  78. return string.replace(/،/g, ',');
  79. },
  80. postformat: function (string) {
  81. return string.replace(/,/g, '،');
  82. },
  83. week: {
  84. dow: 7, // Sunday is the first day of the week.
  85. doy: 12, // The week that contains Jan 12th is the first week of the year.
  86. },
  87. });