mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-17 03:56:31 +01:00
handle very old date strings
This commit is contained in:
parent
99e4a79cb8
commit
45440eec1d
3 changed files with 14 additions and 10 deletions
5
src-ui/src/app/utils/date.ts
Normal file
5
src-ui/src/app/utils/date.ts
Normal 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`)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue