mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-07 23:39:09 +00:00
fix: format clock from preset (#2066)
* fix: format clock from preset * fix: add to all views * chore: format * refactor: return flat value from common.options.ts
This commit is contained in:
committed by
GitHub
parent
1a08b39b8b
commit
a5e733246d
@@ -5,9 +5,9 @@ import { formatTime } from '../../common/utils/time';
|
||||
/**
|
||||
* Gathers display elements for the large studio clock
|
||||
*/
|
||||
export function getLargeClockData(clock: number) {
|
||||
export function getLargeClockData(clock: number, timeformat: string | null) {
|
||||
const [display, meridian] = (() => {
|
||||
const formatted = formatTime(clock);
|
||||
const formatted = formatTime(clock, { override: timeformat });
|
||||
if (formatted.endsWith('AM')) {
|
||||
return [formatted.slice(0, -2), 'AM'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user