Open GoogleCodeExporter opened 8 years ago
I'm stuck on this problem at the moment
Original comment by vijay.sa...@gmail.com
on 27 Sep 2009 at 1:27
Same here on IE8.
At least the documentation should be updated.
Original comment by dan.jul...@gmail.com
on 21 Jul 2010 at 8:25
Same here, changed to use toString instead.
Original comment by scko...@gmail.com
on 6 Oct 2011 at 3:41
Or change to "toJSONString"
Original comment by tokyo.t...@gmail.com
on 8 May 2012 at 1:32
Works fine on the current builds in my fork:
http://github.com/abritinthebay/datejs/issues/82
Original comment by darkcr...@gmail.com
on 15 Sep 2013 at 7:16
[deleted comment]
toJSON() works in IE8 mode but not real IE8!
function toISOString(date){
var m = 1+date.getMonth()
var d = date.getDay()
return date.getFullYear()+"-"+(m<10?'0'+m:m)+"-"+(d<10?'0'+d:d)
}
Original comment by CTimmerm...@gmail.com
on 3 Oct 2013 at 1:48
@CTimmerm: thanks alot for sharing that routine! Besides just working, it's
also very concise and yet still makes much shorter work of padding the leading
zero for the date and month values than other solutions I came across on other
sites like stakoverflow.
For my part, I would just suggest that your use of the date.getDay() method
seems to deviate from both JSON or ISO standards... as it's grabbing the "day
of the week" rather than the "the day of the month". Not sure if you can edit
that post, but for posterity might be good to replace it with date.getDate().
Thanks again for sharing your workaround! Maybe one of these days I'll find an
answer why none of the date object to<String> like methods work in system
jscript tests on my Win7 system.
Original comment by stej...@gmail.com
on 17 Jan 2014 at 1:01
Original issue reported on code.google.com by
robbins0...@gmail.com
on 7 Aug 2009 at 12:07