handle very old date strings

This commit is contained in:
Michael Shamoon
2022-04-30 21:40:07 -07:00
parent c1a183720c
commit 67a1ad37fc
3 changed files with 14 additions and 10 deletions

View File

@@ -0,0 +1,5 @@
// see https://github.com/dateutil/dateutil/issues/878 , JS Date does not
// seem to accept these strings as valid dates so we must normalize offset
export function normalizeDateStr(dateStr: string): string {
return dateStr.replace(/-(\d\d):\d\d:\d\d/gm, `-$1:00`)
}