fix: fix issue with ETA and 12h time format (#1463)
This commit is contained in:
parent
bcbef2f19a
commit
039a446944
@ -1071,10 +1071,9 @@ export const getters: GetterTree<PrinterState, RootState> = {
|
||||
const date = new Date(eta)
|
||||
let am = true
|
||||
let h: string | number = date.getHours()
|
||||
if (hours12Format && h > 12) {
|
||||
am = false
|
||||
h -= 12
|
||||
}
|
||||
|
||||
if (hours12Format && h > 11) am = false
|
||||
if (hours12Format && h > 12) h -= 12
|
||||
if (h < 10) h = '0' + h
|
||||
|
||||
const m = date.getMinutes() >= 10 ? date.getMinutes() : '0' + date.getMinutes()
|
||||
|
Loading…
x
Reference in New Issue
Block a user