Holiday Calc

This program calculates dates from textual specifications (see below for valid format). Maybe it could be used for calculating holidays.
Year
Description:

Example of descriptions:
1st Sun in Nov
Last Sat before Jun 1
Sun before last Wed before Sun after Aug 1

The grammar

This is a somewhat technical description of the grammar that Holiday Calc recognized:
  date:
    MONTH NUMBER              (e.g. Dec 25)
    | date specification
    | special date

  direction
   'before' | 'after'

  date specification:
      NUMBER 'days' direction date       (e.g. 10 days before Jan 12)
    | WEEKDAY direction date             (e.g. Sun before Jun 1)
    | ORDER WEEKDAY 'in' MONTH           (e.g. 3rd Sun in April)
    | ORDER WEEKDAY direction date       (e.g. 1st Sat before Easter) 
   
  special date:
    EASTER        (hardcoded in the program)

  NUMBER:  [0-9]+

  WEEKDAY: (Mon|Tue|Wed|Thu|Fri|Sat|Sun)
  MONTH:   (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)
  ORDER:   1st|2nd|3rd|4th|5th|Last | NUMBER'th'

Yet Another Useless Program created by hakank