fy.js 2.5 KB

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