1
0
Fork 0
mirror of https://github.com/CorentinTh/it-tools.git synced 2025-07-19 05:09:37 +02:00
it-tools/src/modules/shared/date.models.ts

8 lines
199 B
TypeScript
Raw Normal View History

import { format } from 'date-fns';
export { getUrlFriendlyDateTime };
function getUrlFriendlyDateTime({ date = new Date() }: { date?: Date } = {}) {
return format(date, 'yyyy-MM-dd-HH-mm-ss');
}