mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-12 10:53:51 +00:00
770d12888d
* chore: upgrade local build documentation * style: keep scrolling event in screen * feat: delay is time entry * refactor: remove unused * refactor: remove unused * refactor: batch store updates * refactor: virtually remove cap on events * refactor: style and behaviour tweaks to event block * style: tweaks on schedules * chore: remove sentry from server * style: reorder menu * chore: update docs
12 lines
325 B
TypeScript
12 lines
325 B
TypeScript
import { DateTime } from 'luxon';
|
|
|
|
/**
|
|
* @description utility function to format a date in milliseconds using luxon
|
|
* @param {number} millis
|
|
* @param {string} format
|
|
* @return {string}
|
|
*/
|
|
export function formatFromMillis(millis: number, format: string) {
|
|
return DateTime.fromMillis(millis).toUTC().toFormat(format);
|
|
}
|