40 {
41 Weekday w = date.weekday();
42 Day d = date.dayOfMonth(), dd = date.dayOfYear();
43 Month m = date.month();
44 Year y = date.year();
45 Day em = easterMonday(y);
46
47 if (isWeekend(w)
48
49 || ((d == 1 || ((d == 2 || d == 3) && w == Monday)) && m == January)
50
51 || (dd == em - 3)
52
53 || (dd == em)
54
55 || (m == Mar && ((d == 17) || ((d == 18 || d == 19) && w == Monday)))
56
57 || (m == May && d == Date::nthWeekday(1, Monday, May, y).dayOfMonth())
58
59 || (m == June && d == Date::nthWeekday(1, Monday, June, y).dayOfMonth())
60
61 || (m == August && d == Date::nthWeekday(1, Monday, August, y).dayOfMonth())
62
64
65 || ((d == 25 || (d == 27 && (w == Monday || w == Tuesday))) && m == December)
66
67 || ((d == 26 || (d == 28 && (w == Monday || w == Tuesday))) && m == December))
68 return false;
69 return true;
70}
Date lastWeekday(Weekday dayOfWeek, Month m, Year y)