Closed GoogleCodeExporter closed 8 years ago
Fixed.
Within g.format, modified regex to include four character day and month format
specifiers.
// Old
_.rtoken(/^(dd?d?|MM?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),
// New
_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),
Also had to add a g.dddd and g.MMMM token.
// Old
g.ddd = _.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),
// New
g.ddd = g.dddd = _.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),
Also modified the day to default to '1' instead of the current date.
Example
// If today is 13-Nov-2007
// Old
"July 2004" // 13-Jul-2004
// New
"July 2004" // 1-Jul-2004
All (100%) of the current .parseExact() tests are passing.
Original comment by geoff%co...@gtempaccount.com
on 13 Nov 2007 at 10:21
Original issue reported on code.google.com by
geoff%co...@gtempaccount.com
on 12 Nov 2007 at 12:46