working with canvas datetime format

This commit is contained in:
2024-09-20 13:36:01 -06:00
parent 8a9dceb5b6
commit 32b211c9b2
3 changed files with 69 additions and 19 deletions

View File

@@ -52,4 +52,13 @@ describe("Can properly handle expected date formats", () => {
const updatedString = dateToMarkdownString(dateObject!)
expect(updatedString).toBe(dateString)
});
it("can handle canvas time format", () => {
const dateString = "8/29/2024, 5:00:00 PM";
const dateObject = getDateFromString(dateString);
expect(dateObject).not.toBeUndefined()
const updatedString = dateToMarkdownString(dateObject!)
expect(updatedString).toBe("08/29/2024 17:00:00")
})
});