date format issue in firefox 39.0

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

date format issue in firefox 39.0

Post by jaisee »

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
User avatar
DanRaisch
Moderator
Posts: 127188
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: date format issue in firefox 39.0

Post by DanRaisch »

Moving to Web Development.
User avatar
WaltS48
Posts: 5141
Joined: May 7th, 2010, 9:38 am
Location: Pennsylvania, USA

Re: date format issue in firefox 39.0

Post by WaltS48 »

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
User avatar
trolly
Moderator
Posts: 39851
Joined: August 22nd, 2005, 7:25 am

Re: date format issue in firefox 39.0

Post by trolly »

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.
User avatar
dickvl
Posts: 54145
Joined: July 18th, 2005, 3:25 am

Re: date format issue in firefox 39.0

Post by dickvl »

Post Reply