it.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. (function (factory) {
  6. if (typeof define === 'function' && define.amd) {
  7. define(['moment'], factory); // AMD
  8. } else if (typeof exports === 'object') {
  9. module.exports = factory(require('../moment')); // Node
  10. } else {
  11. factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
  12. }
  13. }(function (moment) {
  14. return moment.defineLocale('it', {
  15. months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),
  16. monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
  17. weekdays : 'Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato'.split('_'),
  18. weekdaysShort : 'Dom_Lun_Mar_Mer_Gio_Ven_Sab'.split('_'),
  19. weekdaysMin : 'D_L_Ma_Me_G_V_S'.split('_'),
  20. longDateFormat : {
  21. LT : 'HH:mm',
  22. LTS : 'LT:ss',
  23. L : 'DD/MM/YYYY',
  24. LL : 'D MMMM YYYY',
  25. LLL : 'D MMMM YYYY LT',
  26. LLLL : 'dddd, D MMMM YYYY LT'
  27. },
  28. calendar : {
  29. sameDay: '[Oggi alle] LT',
  30. nextDay: '[Domani alle] LT',
  31. nextWeek: 'dddd [alle] LT',
  32. lastDay: '[Ieri alle] LT',
  33. lastWeek: function () {
  34. switch (this.day()) {
  35. case 0:
  36. return '[la scorsa] dddd [alle] LT';
  37. default:
  38. return '[lo scorso] dddd [alle] LT';
  39. }
  40. },
  41. sameElse: 'L'
  42. },
  43. relativeTime : {
  44. future : function (s) {
  45. return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s;
  46. },
  47. past : '%s fa',
  48. s : 'alcuni secondi',
  49. m : 'un minuto',
  50. mm : '%d minuti',
  51. h : 'un\'ora',
  52. hh : '%d ore',
  53. d : 'un giorno',
  54. dd : '%d giorni',
  55. M : 'un mese',
  56. MM : '%d mesi',
  57. y : 'un anno',
  58. yy : '%d anni'
  59. },
  60. ordinalParse : /\d{1,2}º/,
  61. ordinal: '%dº',
  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. }));