Open GoogleCodeExporter opened 9 years ago
Update 2009/06/22: Bug remains as of Firefox 3.5pre.
Original comment by keith.hu...@gmail.com
on 22 Jun 2009 at 2:02
I am also seeing this in FF3.5. Does anyone have a workaround?
Original comment by joey.ski...@gmail.com
on 6 Jul 2009 at 9:17
A simple but not-so-elegant work-around is to just check for version 3.1+ of
Firefox,e.g.:
date = myDate.toISOString();
if (navigator.userAgent.search(/3\.[1-9]/) == -1)
date = date.slice(1, -1);
Original comment by keith.hu...@gmail.com
on 7 Jul 2009 at 12:15
Update 2009/07/23:
Webkit also return single-quotes, so it looks like Firefox 3 (and older
versions?)
are the only ones so far affected by this issue.
A simple solution to deal with either case is to simply remove all any quotation
marks, e.g.
myDate.toISOString().replace(/"/g,'');
If you want to keep one set of quotes:
myDate.toISOString().replace(/""/g,'"');
Any chance of fixing the behavior in Firefox 3.0?
Original comment by keith.hu...@gmail.com
on 23 Jul 2009 at 2:41
The .toISOString function was based on the JSON.org .toISOString function and
is only
added by Datejs if the .toISOString function is not available natively.
I just checked http://www.json.org/json.js (and http://www.json.org/json2.js)
and it
appears they've once again changed the file and replaced the .toISOString
function
with .toJSON.
The functionality and return result of .toJSON (formally .toISOString) appears
to
have changed as well.
I'm going to have to replace .toISOString. Maybe replace with our own
.toJsonString()
and just completely avoid the JSON.org and native browser versions.
Original comment by geoff%co...@gtempaccount.com
on 29 Jul 2009 at 7:03
Using the MDN approved toISOString substitute now in my fork:
https://github.com/abritinthebay/datejs/
Original comment by darkcr...@gmail.com
on 14 Sep 2013 at 1:01
Original issue reported on code.google.com by
keith.hu...@gmail.com
on 21 Oct 2008 at 3:13