Test fixes
parent
3ac21498f3
commit
8b811f11c9
|
@ -22,9 +22,6 @@ Deno.test("JSON utils", () => {
|
|||
assertEquals(cleanupJSON({ a: [{ "a.b": 1 }] }), {
|
||||
a: [{ a: { b: 1 } }],
|
||||
});
|
||||
assertEquals(
|
||||
cleanupJSON(new Date("2023-05-13T12:30:00Z")),
|
||||
"2023-05-13T12:30:00.000Z",
|
||||
);
|
||||
|
||||
assertEquals(cleanupJSON(new Date("2023-05-03T00:00:00Z")), "2023-05-03");
|
||||
});
|
||||
|
|
|
@ -60,7 +60,7 @@ export function cleanStringDate(d: Date): string {
|
|||
String(d.getMonth() + 1).padStart(2, "0") + "-" +
|
||||
String(d.getDate()).padStart(2, "0");
|
||||
} else {
|
||||
return localDateString(d);
|
||||
return d.toISOString();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue