ss.js 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. //! moment.js locale configuration
  2. //! locale : siSwati [ss]
  3. //! author : Nicolai Davies<mail@nicolai.io> : https://github.com/nicolaidavies
  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. //! moment.js locale configuration
  11. var ss = moment.defineLocale('ss', {
  12. months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split(
  13. '_'
  14. ),
  15. monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),
  16. weekdays: 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(
  17. '_'
  18. ),
  19. weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),
  20. weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),
  21. weekdaysParseExact: true,
  22. longDateFormat: {
  23. LT: 'h:mm A',
  24. LTS: 'h:mm:ss A',
  25. L: 'DD/MM/YYYY',
  26. LL: 'D MMMM YYYY',
  27. LLL: 'D MMMM YYYY h:mm A',
  28. LLLL: 'dddd, D MMMM YYYY h:mm A',
  29. },
  30. calendar: {
  31. sameDay: '[Namuhla nga] LT',
  32. nextDay: '[Kusasa nga] LT',
  33. nextWeek: 'dddd [nga] LT',
  34. lastDay: '[Itolo nga] LT',
  35. lastWeek: 'dddd [leliphelile] [nga] LT',
  36. sameElse: 'L',
  37. },
  38. relativeTime: {
  39. future: 'nga %s',
  40. past: 'wenteka nga %s',
  41. s: 'emizuzwana lomcane',
  42. ss: '%d mzuzwana',
  43. m: 'umzuzu',
  44. mm: '%d emizuzu',
  45. h: 'lihora',
  46. hh: '%d emahora',
  47. d: 'lilanga',
  48. dd: '%d emalanga',
  49. M: 'inyanga',
  50. MM: '%d tinyanga',
  51. y: 'umnyaka',
  52. yy: '%d iminyaka',
  53. },
  54. meridiemParse: /ekuseni|emini|entsambama|ebusuku/,
  55. meridiem: function (hours, minutes, isLower) {
  56. if (hours < 11) {
  57. return 'ekuseni';
  58. } else if (hours < 15) {
  59. return 'emini';
  60. } else if (hours < 19) {
  61. return 'entsambama';
  62. } else {
  63. return 'ebusuku';
  64. }
  65. },
  66. meridiemHour: function (hour, meridiem) {
  67. if (hour === 12) {
  68. hour = 0;
  69. }
  70. if (meridiem === 'ekuseni') {
  71. return hour;
  72. } else if (meridiem === 'emini') {
  73. return hour >= 11 ? hour : hour + 12;
  74. } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {
  75. if (hour === 0) {
  76. return 0;
  77. }
  78. return hour + 12;
  79. }
  80. },
  81. dayOfMonthOrdinalParse: /\d{1,2}/,
  82. ordinal: '%d',
  83. week: {
  84. dow: 1, // Monday is the first day of the week.
  85. doy: 4, // The week that contains Jan 4th is the first week of the year.
  86. },
  87. });
  88. return ss;
  89. })));