Talk:JavaScript/Dates
Add topicThe following is very vague, the purpose of text argument need to be explained in more detail:
Properties and methods of the Date() object:
- ...
- parse(text)
- Reads the string text, and returns the number of milliseconds since January 1, 1970.
Seipher (talk) 19:14, 8 October 2010 (UTC)
Example code
[edit source]Why is the variable in the example code called time_before_2000? It sounds like this is part of a piece of code that was going to calculate the length of time before the rollover to the year 2000, but as it is it's just a confusingly named variable (since it is a date, not a length of time). A recent change made it no longer point to midnight on the 31st of December, so it's even more confusing now. --Fishpi (discuss • contribs) 21:02, 3 March 2011 (UTC)
Date Object
[edit source]It says "The date object normally stores the value within the local time zone.". That is wrong. By ECMA specification, the Date Object stores integer milliseconds since 1970.0 UTC.
Additionally, "time zone" was probably wrongly used; time zones depend on the Winter offset from UTC, and take no account of Summer time.
See http://www.merlyn.demon.co.uk/js-dates.htm ff. and ECMA 262. 94.30.84.71 (discuss) 23:23, 3 February 2013 (UTC)
Suggestion
[edit source]You should add a section about +new Date, which returns the date as an integer, e.g. 1362448029003. ~B1KWikis 4-3-13_18:48 (MT).