Hi Mohammad

TiddlyWiki 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:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC
 
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC>

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 wishes

Jeremy.


> On 4 Aug 2019, at 16:23, Mohammad <[email protected]> wrote:
> 
> In https://tiddlywiki.com/prerelease/ <https://tiddlywiki.com/prerelease/>
> 
> Create an empty tiddler
> Then create a field named date with value (eight zeros) 00000000
> Then paste the below code
> 
> <$view field=date format=date />
> 
> I see
> 1899 11 30 03:25
> 
> 
> 
> What 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 [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/33d8f658-fb2d-4a1c-93d3-a6b91b13da91%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywiki/33d8f658-fb2d-4a1c-93d3-a6b91b13da91%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/994B3615-CB37-4F2A-B8A9-D6437F8DAAA7%40gmail.com.

Reply via email to