Fix 24-hour time format
This commit is contained in:
parent
1b66a3dd73
commit
b596502fa9
@ -65,6 +65,8 @@ export function formatDateAccordingToTodayNew(time: Date) {
|
||||
}).element;
|
||||
}
|
||||
|
||||
MOUNT_CLASS_TO && (MOUNT_CLASS_TO.formatDateAccordingToTodayNew = formatDateAccordingToTodayNew);
|
||||
|
||||
export const getFullDate = (date: Date, options: Partial<{
|
||||
noTime: true,
|
||||
noSeconds: true,
|
||||
|
@ -352,7 +352,9 @@ namespace I18n {
|
||||
safeAssign(this, options);
|
||||
|
||||
//var options = { month: 'long', day: 'numeric' };
|
||||
const dateTimeFormat = new Intl.DateTimeFormat(lastRequestedLangCode, this.options);
|
||||
|
||||
// * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle#adding_an_hour_cycle_via_the_locale_string
|
||||
const dateTimeFormat = new Intl.DateTimeFormat(lastRequestedLangCode + '-u-hc-h23', this.options);
|
||||
|
||||
(this.element as any)[this.property] = capitalizeFirstLetter(dateTimeFormat.format(this.date));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user