dv.js 2.6 KB

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