You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Support 12hr time in full date
Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
@@ -83,7 +83,7 @@ module.exports = {
|
|||||||
return this.formatFullDate(date);
|
return this.formatFullDate(date);
|
||||||
},
|
},
|
||||||
|
|
||||||
formatFullDate: function(date) {
|
formatFullDate: function(date, showTwelveHour=false) {
|
||||||
const days = getDaysArray();
|
const days = getDaysArray();
|
||||||
const months = getMonthsArray();
|
const months = getMonthsArray();
|
||||||
return _t('%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s %(time)s', {
|
return _t('%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s %(time)s', {
|
||||||
@@ -91,7 +91,7 @@ module.exports = {
|
|||||||
monthName: months[date.getMonth()],
|
monthName: months[date.getMonth()],
|
||||||
day: date.getDate(),
|
day: date.getDate(),
|
||||||
fullYear: date.getFullYear(),
|
fullYear: date.getFullYear(),
|
||||||
time: this.formatTime(date),
|
time: showTwelveHour ? twelveHourTime(date) : this.formatTime(date),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user