Michael Shamoon 9ed6c78466 Update date.ts
[ci skip]
2022-05-13 11:52:05 -07:00

6 lines
273 B
TypeScript

// 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`)
}