Raw formula: 7 * Q - 6 + (N - DoW(Year,Month,1)) % 7

Parameters:

  1. year
  2. month
  3. N=weekday: 0=Sunday, ... 6=Saturday
  4. Q=1 for first N-day, 2 for second, etc... or -1 for last N-day, -2 for second to last, etc...


Holiday 2006 2007 2008 2009 2010
MLK Jr Day -- 3rd Monday in January Jan 16 = 16 Jan 15 = 15 Jan 21 = 21 Jan 19 = 19 Jan 18 = 18
Presidents Day -- 3rd Monday in February Feb 20 = 20 Feb 19 = 19 Feb 18 = 18 Feb 16 = 16 Feb 15 = 15
Mothers Day -- 2nd Sunday in May May 14 = 14 May 13 = 13 May 11 = 11 May 10 = 10 May 9 = 9
Memorial Day -- Last Monday in May May 29 = 表达式错误:预期外的<运算符。 May 28 = 表达式错误:预期外的<运算符。 May 26 = 表达式错误:预期外的<运算符。 May 25 = 表达式错误:预期外的<运算符。 May 31 = 表达式错误:预期外的<运算符。
Fathers Day -- 3rd Sunday in June Jun 18 = 18 Jun 17 = 17 Jun 15 = 15 Jun 21 = 21 Jun 20 = 20
Labor Day -- 1st Monday in September Sep 4 = 4 Sep 3 = 3 Sep 1 = 1 Sep 7 = 7 Sep 6 = 6
Columbus Day -- 2nd Monday in October Oct 9 = 9 Oct 8 = 8 Oct 13 = 13 Oct 12 = 12 Oct 11 = 11
Thanksgiving -- 4th Thursday in November Nov 23 = 23 Nov 22 = 22 Nov 27 = 27 Nov 26 = 26 Nov 25 = 25

参见

编辑