it.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. //! moment.js locale configuration
  2. //! locale : Italian [it]
  3. //! author : Lorenzo : https://github.com/aliem
  4. //! author: Mattia Larentis: https://github.com/nostalgiaz
  5. //! author: Marco : https://github.com/Manfre98
  6. import moment from '../moment';
  7. export default moment.defineLocale('it', {
  8. months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
  9. '_'
  10. ),
  11. monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
  12. weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
  13. '_'
  14. ),
  15. weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
  16. weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
  17. longDateFormat: {
  18. LT: 'HH:mm',
  19. LTS: 'HH:mm:ss',
  20. L: 'DD/MM/YYYY',
  21. LL: 'D MMMM YYYY',
  22. LLL: 'D MMMM YYYY HH:mm',
  23. LLLL: 'dddd D MMMM YYYY HH:mm',
  24. },
  25. calendar: {
  26. sameDay: function () {
  27. return (
  28. '[Oggi a' +
  29. (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
  30. ']LT'
  31. );
  32. },
  33. nextDay: function () {
  34. return (
  35. '[Domani a' +
  36. (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
  37. ']LT'
  38. );
  39. },
  40. nextWeek: function () {
  41. return (
  42. 'dddd [a' +
  43. (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
  44. ']LT'
  45. );
  46. },
  47. lastDay: function () {
  48. return (
  49. '[Ieri a' +
  50. (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
  51. ']LT'
  52. );
  53. },
  54. lastWeek: function () {
  55. switch (this.day()) {
  56. case 0:
  57. return (
  58. '[La scorsa] dddd [a' +
  59. (this.hours() > 1
  60. ? 'lle '
  61. : this.hours() === 0
  62. ? ' '
  63. : "ll'") +
  64. ']LT'
  65. );
  66. default:
  67. return (
  68. '[Lo scorso] dddd [a' +
  69. (this.hours() > 1
  70. ? 'lle '
  71. : this.hours() === 0
  72. ? ' '
  73. : "ll'") +
  74. ']LT'
  75. );
  76. }
  77. },
  78. sameElse: 'L',
  79. },
  80. relativeTime: {
  81. future: 'tra %s',
  82. past: '%s fa',
  83. s: 'alcuni secondi',
  84. ss: '%d secondi',
  85. m: 'un minuto',
  86. mm: '%d minuti',
  87. h: "un'ora",
  88. hh: '%d ore',
  89. d: 'un giorno',
  90. dd: '%d giorni',
  91. w: 'una settimana',
  92. ww: '%d settimane',
  93. M: 'un mese',
  94. MM: '%d mesi',
  95. y: 'un anno',
  96. yy: '%d anni',
  97. },
  98. dayOfMonthOrdinalParse: /\d{1,2}º/,
  99. ordinal: '%dº',
  100. week: {
  101. dow: 1, // Monday is the first day of the week.
  102. doy: 4, // The week that contains Jan 4th is the first week of the year.
  103. },
  104. });