Jump to content

JavaScript UTC() Method example


Guest wx27

Recommended Posts

Just wanted to mention an inconsistency in the example for the JavaScript UTC() Method page (http://www.w3schools.com/jsref/jsref_utc.asp)

month 	Required. An integer between 0 and 11 representing the monthReturn the number of milliseconds from January 1, 1970 to July 8, 2005, according to universal time:var d=Date.UTC(2005,7,8);

Either the example should read "August 8, 2005" or the code example should read var d=Date.UTC(2005,6,8)

Link to comment
Share on other sites

Err, in the Gregorian calendar, the seventh month is July...
yeah, but if the month count starts at 0, like an array index, then the index for the 7th item in the array would be 6. (0,1,2,3,4,5,6,.....)
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...