Javascript Date() constructor does not accept TiddlyWiki date format as input, nor empty strings.
Closed this issue · 2 comments
amreus commented
Using BobWin.exe 1.6.2r2, Windows 10, latest Firefox 81.0.2.
There are several places in the code where there is a call to (for example) new Date(SomeObject.fields.created)
I'm mostly interested in these 2:
These lines return "NaN"
// empty string
$tw.utils.stringifyDate(new Date(""));
==> "NaNNaNNaNNaNNaNNaNNaN"
// TiddlyWiki date
$tw.utils.stringifyDate(new Date("20201016232045362"));
==> "NaNNaNNaNNaNNaNNaNNaN"
inmysocks commented
This works as intended. All of the tools that I use to work with the api send the dates as stringifyed javascript dates.
Please read and follow the guidelines for making a bug report or feature request https://ooktech-public.gitlab.io/guidelines/
amreus commented
Gotcha, thanks.