Better date input demo

# Date input demo

The following field accepts dates in a variety of formats, including the words "today", "tomorrow" and "yesterday" (or shortenings thereof), variations on "6th October 2003", "next Tuesday" and others.

Note that the default display method for dates is American style (m/d/yyyy).

Further information at Simon Willison's weblog: A better way of entering dates.

I have modified the code to fix a few bugs that I found, added different date formats and added the calendar popup.

Tanny O'Haley

mm/dd/yyyy

Allow holidays to be clicked in popup calendar.

Calendar Day Mask

Sun Mon Tue Wed Thu Fri Sat

Try these:

- Today
- Tod
- tomorrow
- tom
- yesterday
- 6th
- 6th October
- 10th Feb 2004
- 12 feb
- 1 ja
- last Friday
- last fri
- last m
- this Friday
- this fri
- this m
- next Friday
- next fri
- next m
- first fri
- second fri
- third fri
- fourth fri
- 2004-04-04
- 2004-8-8

last <day of week>
  The closest day previous to yesterday. If today is Wednesday, last Tuesday would not be yesterday but eight days ago. Last Monday would be two days ago.
this <day of week>
  The closest day following today. It could be said that this is equal to this coming. If today is Wednesday, this Tuesday would be the six days from today and this Thursday would be tomorrow.
next <day of week>
  The day of the week in the week following this week, but not tomorrow. If today is Saturday, next Sunday would not be tomorrow but eight days from today. If today is Wednesday, next Thursday would not be in this week but in next week which would be eight days from today.