few bugdic

This commit is contained in:
Olivier Gagnon
2021-11-11 17:00:36 -05:00
parent 486e8a107f
commit cf2efe7698
14 changed files with 97 additions and 58 deletions
+9 -2
View File
@@ -1,3 +1,10 @@
export function formatTime(format: string): string {
return "";
import { format } from "date-fns";
export function formatTime(fmt: string): string {
try {
return format(new Date(), fmt);
} catch (err: any) {
console.error(err);
return "format error";
}
}