Open GoogleCodeExporter opened 8 years ago
Still happening to me as well.
Original comment by walkerde...@gmail.com
on 19 Apr 2012 at 4:47
[deleted comment]
Also happened to me. Here is my fix around it:
d = new Date(),
w = d.toString("dddd, MMMM dXXXX, yyyy"),
replace = d.getOrdinal();
w.replace("XXXX", replace);
Hope this helps.
Original comment by fily.oli...@gmail.com
on 11 Jul 2012 at 11:05
Nice! Thanks. :-)
Original comment by iangilman
on 12 Jul 2012 at 5:51
Bug is still present, but this worked for me - thanks to the commenter above!
var d1 = Date.parse("tomorrow");
console.log( d1.toString("MMM d")+d1.getOrdinal() );
Outputs "Sep 15th"
Original comment by t...@jivebrew.com
on 14 Sep 2012 at 2:29
Same problem S outputs S.
Original comment by IainMNor...@gmail.com
on 5 Feb 2013 at 5:08
@#6IainMNor...@gmail.com
Follow my solution (#3). Seems to do the job. Not the best, but gets it sorted
Original comment by fily.oli...@gmail.com
on 5 Feb 2013 at 5:09
Easy (and not kludgy) fix for this.
On line 42 in date.js, FIND THE FOLLOWING TEXT:
case"d":return self.getDate().toString();
And ADD THIS BIT DIRECTLY AFTER IT:
case"S":return self.getOrdinal();
THEN, REPLACE (also on line 42):
/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g
WITH:
/dd?d?d?|S|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g
That's it! Works like a charm. :)
Original comment by hoffer....@gmail.com
on 17 Apr 2013 at 2:36
Looks like the author had just forgotten to put this in. :P
Original comment by hoffer....@gmail.com
on 17 Apr 2013 at 2:37
Awesome… At least we can all have the fix in our own versions. :-)
Original comment by iangilman
on 18 Apr 2013 at 3:57
works fine in the current build of my fork:
https://github.com/abritinthebay/datejs/
(also works in the one in the SVN here).
Original comment by darkcr...@gmail.com
on 16 Sep 2013 at 4:17
Yeah, I guess this repo is just dead... no releases since 2007 (even if the bug
is fixed in the source). Great to know about your fork!
Original comment by iangilman
on 16 Sep 2013 at 9:53
Original issue reported on code.google.com by
iangilman
on 28 Mar 2012 at 8:29