fix 3
This commit is contained in:
@@ -136,10 +136,10 @@ function formatTime(t: string): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function formatTimeLocal(t: string, offsetMinutes: number): string {
|
function formatTimeLocal(t: string, offsetMinutes: number): string {
|
||||||
const mins = timeToMinutes(t) - offsetMinutes;
|
const totalMins = timeToMinutes(t) - offsetMinutes;
|
||||||
let h = Math.floor(mins / 60) % 24;
|
let h = Math.floor(totalMins / 60) % 24;
|
||||||
if (h < 0) h += 24;
|
if (h < 0) h += 24;
|
||||||
const m = mins % 60;
|
let m = totalMins % 60;
|
||||||
if (m < 0) m += 60;
|
if (m < 0) m += 60;
|
||||||
const period = h >= 12 ? 'PM' : 'AM';
|
const period = h >= 12 ? 'PM' : 'AM';
|
||||||
const dh = h > 12 ? h - 12 : h === 0 ? 12 : h;
|
const dh = h > 12 ? h - 12 : h === 0 ? 12 : h;
|
||||||
|
|||||||
Reference in New Issue
Block a user