Closed GoogleCodeExporter closed 9 years ago
Added the following check in Date.Translator.finish()
if (this.weekday && !this.day) {
this.day = (today.addDays((Date.getDayNumberFromName(this.weekday) -
today.getDay()))).getDate();
}
The day will be set to day-of-the-week as supplied. The functionality is
different
than 'next | last', as the day-of-the-week could be in the past or future.
Example
// If today is Tuesday...
Date.parse('monday') // returns yesterday's date
Date.parse('wed') // returns tomorrow's date
The following parse is now also possible...
// If today is 13-Nov-2007
Date.parse('friday march') // 13-Mar-2007
Original comment by geoff%co...@gtempaccount.com
on 13 Nov 2007 at 9:52
Original issue reported on code.google.com by
geoff%co...@gtempaccount.com
on 13 Nov 2007 at 8:54