LLL : "D. MMMM YYYY HH:mm U\\hr",
LLLL : "dddd, D. MMMM YYYY HH:mm U\\hr"
},
+ meridiem : {
+ AM : 'AM',
+ am : 'am',
+ PM : 'PM',
+ pm : 'pm'
+ },
relativeTime : {
future : "in %s",
past : "vor %s",
LLL : "D MMMM YYYY HH:mm",
LLLL : "dddd D MMMM YYYY HH:mm"
},
+ meridiem : {
+ AM : 'AM',
+ am : 'am',
+ PM : 'PM',
+ pm : 'pm'
+ },
relativeTime : {
future : "en %s",
past : "hace %s",
LLL : "D MMMM YYYY HH:mm",
LLLL : "dddd D MMMM YYYY HH:mm"
},
+ meridiem : {
+ AM : 'AM',
+ am : 'am',
+ PM : 'PM',
+ pm : 'pm'
+ },
relativeTime : {
future : "dans %s",
past : "il y a %s",
monthsShort : "Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"),
weekdays : "Domenica_Lunedi_Martedi_Mercoledi_Giovedi_Venerdi_Sabato".split("_"),
weekdaysShort : "Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),
- // copied from french, needs revision from italian speakers
longDateFormat : {
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY HH:mm",
LLLL : "dddd, D MMMM YYYY HH:mm"
},
+ meridiem : {
+ AM : 'AM',
+ am : 'am',
+ PM : 'PM',
+ pm : 'pm'
+ },
relativeTime : {
future : "in %s",
past : "%s fa",
LLL : "D MMMM YYYY HH:mm",
LLLL : "dddd D MMMM YYYY HH:mm"
},
+ meridiem : {
+ AM : 'AM',
+ am : 'am',
+ PM : 'PM',
+ pm : 'pm'
+ },
relativeTime : {
future : "om %s",
past : "for %s siden",
LLL : "MMMM D YYYY HH:mm",
LLLL : "dddd, D MMMM YYYY HH:mm"
},
+ meridiem : {
+ AM : 'AM',
+ am : 'am',
+ PM : 'PM',
+ pm : 'pm'
+ },
relativeTime : {
future : "over %s",
past : "%s geleden",
LLL : "D MMMM YYYY HH:mm",
LLLL : "dddd, D MMMM YYYY HH:mm"
},
+ meridiem : {
+ AM : 'AM',
+ am : 'am',
+ PM : 'PM',
+ pm : 'pm'
+ },
relativeTime : {
future : "za %s",
past : "%s temu",
LLL : "D \\de MMMM \\de YYYY HH:mm",
LLLL : "dddd, D \\de MMMM \\de YYYY HH:mm"
},
+ meridiem : {
+ AM : 'AM',
+ am : 'am',
+ PM : 'PM',
+ pm : 'pm'
+ },
relativeTime : {
future : "em %s",
past : "%s atrás",
LLL : "D MMMM YYYY HH:mm",
LLLL : "dddd D MMMM YYYY HH:mm"
},
+ meridiem : {
+ AM : 'AM',
+ am : 'am',
+ PM : 'PM',
+ pm : 'pm'
+ },
relativeTime : {
future : "om %s",
past : "för %s sen",
round = Math.round,
languages = {},
hasModule = (typeof module !== 'undefined'),
- paramsToParse = 'months|monthsShort|weekdays|weekdaysShort|longDateFormat|relativeTime|ordinal'.split('|'),
+ paramsToParse = 'months|monthsShort|weekdays|weekdaysShort|longDateFormat|relativeTime|ordinal|meridiem'.split('|'),
i,
VERSION = "1.1.1",
shortcuts = 'Month|Date|Hours|Minutes|Seconds'.split('|');
charactersToReplace = /(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|dddd?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|zz?|LL?L?L?)/g,
nonuppercaseLetters = /[^A-Z]/g,
timezoneRegex = /\([A-Za-z ]+\)|:[0-9]{2} [A-Z]{3} /g,
- ordinal = moment.ordinal;
+ ordinal = moment.ordinal,
+ meridiem = moment.meridiem;
// check if the character is a format
// return formatted string or non string.
//
return currentYear;
// AM / PM
case 'a' :
- return currentHours > 11 ? 'pm' : 'am';
+ return currentHours > 11 ? meridiem.pm : meridiem.am;
case 'A' :
- return currentHours > 11 ? 'PM' : 'AM';
+ return currentHours > 11 ? meridiem.PM : meridiem.AM;
// 24 HOUR
case 'H' :
return currentHours;
LLL : "MMMM D YYYY h:mm A",
LLLL : "dddd, MMMM D YYYY h:mm A"
},
+ meridian : {
+ AM : 'AM',
+ am : 'am',
+ PM : 'PM',
+ pm : 'pm'
+ },
relativeTime : {
future : "in %s",
past : "%s ago",
a(href="#/custom/longDateFormats") Long Date Formats
li
a(href="#/custom/relativeTime") Relative Time
+ li
+ a(href="#/custom/meridiem") AM/PM
li
a(href="#/custom/ordinal") Ordinal
#docs
| (The reason for the inverted logic is because the default behavior is to display with the suffix.)
+ a(name="/custom/meridiem")
+ h3
+ span AM/PM
+ p
+ code moment.meridiem
+ | should be a map of upper and lowercase versions of am/pm.
+ pre moment.meridiem = {\n
+ | am : 'am',
+ | AM : 'AM',
+ | pm : 'pm',
+ | PM : 'PM'
+ | };
+
a(name="/custom/ordinal")
h3
span Ordinal
p
code moment.ordinal
- | should be a function that returns the ordinal for a given number.
+ | should be a function that returns the ordinal for a given number.
pre moment.ordinal = function (number) {\n
| var b = number % 10;
| return (~~ (number % 100 / 10) === 1) ? 'th' :