<$view field=date format=date />
1899 11 30 03:25
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/33d8f658-fb2d-4a1c-93d3-a6b91b13da91%40googlegroups.com.
Hi MohammadTiddlyWiki uses the internal function $tw.utils.parseDate() to convert TW format date strings into proper JavaScript dates. In turn, it uses JavaScript’s Date.UTC() method to construct the date from the components:In this case, we’re calling Date.UTC(0,0,0,0,0,0,0), which happens to return Sun Dec 31 1899 00:00:00 GMT+0000 (Greenwich Mean Time)I think what’s going on is that 0 is out of range for some values, so some defaults are being used.Best wishesJeremy.
On 4 Aug 2019, at 16:23, Mohammad <mohamma...@gmail.com> wrote:
In https://tiddlywiki.com/prerelease/Create an empty tiddlerThen create a field named date with value (eight zeros) 00000000Then paste the below code<$view field=date format=date />
I see1899 11 30 03:25What is wrong here?--Mohammad--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.
Try any date except 0, perhaps 00010000 and see what happens. Zero is famous for divide by zero errors and perhaps year zero never existed.
Calendars are supprisingly complex.
Regards
Tony
In this case, we’re calling Date.UTC(0,0,0,0,0,0,0), which happens to return Sun Dec 31 1899 00:00:00 GMT+0000 (Greenwich Mean Time)
Hi MohammadTiddlyWiki uses the internal function $tw.utils.parseDate() to convert TW format date strings into proper JavaScript dates. In turn, it uses JavaScript’s Date.UTC() method to construct the date from the components:In this case, we’re calling Date.UTC(0,0,0,0,0,0,0), which happens to return Sun Dec 31 1899 00:00:00 GMT+0000 (Greenwich Mean Time)I think what’s going on is that 0 is out of range for some values, so some defaults are being used.Best wishesJeremy.
On 4 Aug 2019, at 16:23, Mohammad <mohamma...@gmail.com> wrote:
In https://tiddlywiki.com/prerelease/Create an empty tiddlerThen create a field named date with value (eight zeros) 00000000Then paste the below code<$view field=date format=date />
I see1899 11 30 03:25What is wrong here?--Mohammad--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.