fy.js 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. //! moment.js locale configuration
  2. //! locale : Frisian [fy]
  3. //! author : Robin van der Vliet : https://github.com/robin0van0der0v
  4. import moment from '../moment';
  5. var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split(
  6. '_'
  7. ),
  8. monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split(
  9. '_'
  10. );
  11. export default moment.defineLocale('fy', {
  12. months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(
  13. '_'
  14. ),
  15. monthsShort: function (m, format) {
  16. if (!m) {
  17. return monthsShortWithDots;
  18. } else if (/-MMM-/.test(format)) {
  19. return monthsShortWithoutDots[m.month()];
  20. } else {
  21. return monthsShortWithDots[m.month()];
  22. }
  23. },
  24. monthsParseExact: true,
  25. weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split(
  26. '_'
  27. ),
  28. weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),
  29. weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),
  30. weekdaysParseExact: true,
  31. longDateFormat: {
  32. LT: 'HH:mm',
  33. LTS: 'HH:mm:ss',
  34. L: 'DD-MM-YYYY',
  35. LL: 'D MMMM YYYY',
  36. LLL: 'D MMMM YYYY HH:mm',
  37. LLLL: 'dddd D MMMM YYYY HH:mm',
  38. },
  39. calendar: {
  40. sameDay: '[hjoed om] LT',
  41. nextDay: '[moarn om] LT',
  42. nextWeek: 'dddd [om] LT',
  43. lastDay: '[juster om] LT',
  44. lastWeek: '[ôfrûne] dddd [om] LT',
  45. sameElse: 'L',
  46. },
  47. relativeTime: {
  48. future: 'oer %s',
  49. past: '%s lyn',
  50. s: 'in pear sekonden',
  51. ss: '%d sekonden',
  52. m: 'ien minút',
  53. mm: '%d minuten',
  54. h: 'ien oere',
  55. hh: '%d oeren',
  56. d: 'ien dei',
  57. dd: '%d dagen',
  58. M: 'ien moanne',
  59. MM: '%d moannen',
  60. y: 'ien jier',
  61. yy: '%d jierren',
  62. },
  63. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  64. ordinal: function (number) {
  65. return (
  66. number +
  67. (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
  68. );
  69. },
  70. week: {
  71. dow: 1, // Monday is the first day of the week.
  72. doy: 4, // The week that contains Jan 4th is the first week of the year.
  73. },
  74. });