mirror of
https://github.com/danog/telegram-tt.git
synced 2025-01-21 21:01:29 +01:00
Fix 0 PM time formatting
This commit is contained in:
parent
eac60f3cc7
commit
0df89e5b93
@ -40,7 +40,7 @@ export function formatTime(datetime: number | Date, lang: LangFn) {
|
||||
let marker = '';
|
||||
if (timeFormat === '12h') {
|
||||
marker = hours >= 12 ? ' PM' : ' AM';
|
||||
hours %= 12;
|
||||
hours = hours > 12 ? hours % 12 : hours;
|
||||
}
|
||||
|
||||
return `${String(hours).padStart(2, '0')}:${String(date.getMinutes()).padStart(2, '0')}${marker}`;
|
||||
|
Loading…
x
Reference in New Issue
Block a user