Files
ontime/packages/utils/src/date-utils/formatFromMillis.ts
T
Carlos Valente 770d12888d V2 beta3 (#338)
* 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
2023-04-14 10:13:46 +02:00

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);
}