ss.js 2.5 KB

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