gl.js 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. //! moment.js locale configuration
  2. //! locale : Galician [gl]
  3. //! author : Juan G. Hurtado : https://github.com/juanghurtado
  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 gl = moment.defineLocale('gl', {
  12. months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split(
  13. '_'
  14. ),
  15. monthsShort:
  16. 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(
  17. '_'
  18. ),
  19. monthsParseExact: true,
  20. weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),
  21. weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),
  22. weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),
  23. weekdaysParseExact: true,
  24. longDateFormat: {
  25. LT: 'H:mm',
  26. LTS: 'H:mm:ss',
  27. L: 'DD/MM/YYYY',
  28. LL: 'D [de] MMMM [de] YYYY',
  29. LLL: 'D [de] MMMM [de] YYYY H:mm',
  30. LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
  31. },
  32. calendar: {
  33. sameDay: function () {
  34. return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
  35. },
  36. nextDay: function () {
  37. return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
  38. },
  39. nextWeek: function () {
  40. return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';
  41. },
  42. lastDay: function () {
  43. return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';
  44. },
  45. lastWeek: function () {
  46. return (
  47. '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'
  48. );
  49. },
  50. sameElse: 'L',
  51. },
  52. relativeTime: {
  53. future: function (str) {
  54. if (str.indexOf('un') === 0) {
  55. return 'n' + str;
  56. }
  57. return 'en ' + str;
  58. },
  59. past: 'hai %s',
  60. s: 'uns segundos',
  61. ss: '%d segundos',
  62. m: 'un minuto',
  63. mm: '%d minutos',
  64. h: 'unha hora',
  65. hh: '%d horas',
  66. d: 'un día',
  67. dd: '%d días',
  68. M: 'un mes',
  69. MM: '%d meses',
  70. y: 'un ano',
  71. yy: '%d anos',
  72. },
  73. dayOfMonthOrdinalParse: /\d{1,2}º/,
  74. ordinal: '%dº',
  75. week: {
  76. dow: 1, // Monday is the first day of the week.
  77. doy: 4, // The week that contains Jan 4th is the first week of the year.
  78. },
  79. });
  80. return gl;
  81. })));