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