mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 07:35:27 +03:00
Handle midnight case
This commit is contained in:
parent
5a0f2b7484
commit
7866e643cb
@ -83,6 +83,10 @@ export function useFormattedHour(
|
||||
const hourNum = parseInt(hour);
|
||||
|
||||
if (hourNum < 12) {
|
||||
if (hourNum == 0) {
|
||||
return `12:${minute} AM`;
|
||||
}
|
||||
|
||||
return `${hourNum}:${minute} AM`;
|
||||
} else {
|
||||
return `${hourNum - 12}:${minute} PM`;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user