You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-12-01 09:58:03 +03:00
Fix overzealous code deletion
Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
@@ -55,6 +55,7 @@ function twelveHourTime(date) {
|
|||||||
let hours = date.getHours() % 12;
|
let hours = date.getHours() % 12;
|
||||||
const minutes = pad(date.getMinutes());
|
const minutes = pad(date.getMinutes());
|
||||||
const ampm = date.getHours() >= 12 ? 'PM' : 'AM';
|
const ampm = date.getHours() >= 12 ? 'PM' : 'AM';
|
||||||
|
hours = hours ? hours : 12; // convert 0 -> 12
|
||||||
return `${hours}:${minutes}${ampm}`;
|
return `${hours}:${minutes}${ampm}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user