mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 07:15:44 +00:00
chore: update formatDate helper function
This commit is contained in:
@@ -10,6 +10,8 @@ export const sleep = (ms: number = 1000) =>
|
|||||||
new Promise((resolve) => setTimeout(resolve, ms));
|
new Promise((resolve) => setTimeout(resolve, ms));
|
||||||
|
|
||||||
export const formatDate = (date: moment.MomentInput, format?: string) => {
|
export const formatDate = (date: moment.MomentInput, format?: string) => {
|
||||||
|
if (!date) return '-';
|
||||||
|
|
||||||
return moment(date).format(format);
|
return moment(date).format(format);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user