MozillaZine

date format issue in firefox 39.0

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
jaisee
 
Posts: 14
Joined: February 12th, 2015, 2:48 am

Post Posted July 22nd, 2015, 3:35 am

Hi,
The date string we pass to Date(07-22-2015 14:33:59) is not valid in firefox 39.0,but works fine in chrome & IE11.

Please see this url for invalid date format,
http://www.w3schools.com/js/tryit.asp?filename=tryjs_date_string_8

waiting for your reply.

Thanks
JC

DanRaisch
Moderator

User avatar
 
Posts: 117788
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted July 22nd, 2015, 3:39 am

Moving to Web Development.

WaltS48

User avatar
 
Posts: 3449
Joined: May 7th, 2010, 9:38 am
Location: Pennsylvania, USA

Post Posted July 22nd, 2015, 6:26 am

Remove the quote " " marks from the date :?: :?: :?:

new Date(03-25-2015)
Linux Desktop - AMD Athlon(tm) II X3 455 3.3GHz | 8.0GB RAM | GeForce GT 630
Windows Notebook - AMD A8 7410 2.2GHz | 6.0GB RAM | AMD Radeon R5

trolly
Moderator

User avatar
 
Posts: 39878
Joined: August 22nd, 2005, 7:25 am

Post Posted July 22nd, 2015, 10:22 am

new Date("03/25/2015 12:00"); -> No ISO format
new Date("2015-03-25"); -> ISO format -> http://stackoverflow.com/questions/8870 ... separators

See also: https://msdn.microsoft.com/library/ff74 ... 94%29.aspx

In other words JS must support ISO formats and may optionally support other formats.

String may depend on locale.
Think for yourself. Otherwise you have to believe what other people tell you.
A society based on individualism is an oxymoron. || Freedom is at first the freedom to starve.
Constitution says: One man, one vote. Supreme court says: One dollar, one vote.

dickvl

User avatar
 
Posts: 52279
Joined: July 18th, 2005, 3:25 am

Post Posted July 22nd, 2015, 1:50 pm


Return to Web Development / Standards Evangelism


Who is online

Users browsing this forum: No registered users and 3 guests