質問

In Javascript, the following date is coming up invalid for Firefox. It is valid Chrome. I really want to keep the format because of the 3 digit month and timezone inclusion. How can i get this to be valid in Firefox?

var d = new Date("16-Jan-2014 10:56:24 am PST");
console.log(d);
役に立ちましたか?

解決

Try this,

var d = new Date("16 Jan 2014 10:56:24 am PST");
console.log(d);

Tested and varified in 1) IE 2) Chrome 3) Firefox

fiddle

enter image description here

good luck!

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top