|
|
|
|
|
|
|
Third, because of the mucking, even if a rule is known, and a date of inception is known for the rule, it is not possible to assume that the rule was observed consistently and without exception during every intervening year between its date of inception to the present. It is always necessary to check the historical record. Caveat programmador. |
|
|
|
|
|
|
|
|
6.2.2.2.2
Martin Luther King, Jr., Day |
|
|
|
|
|
|
|
|
The right to declare days of observance (legal holidays) for citizens of the United States in general is reserved to the individual States. |
|
|
|
|
|
|
|
|
I do not present a complete list of the various holidays declared for each State, since the definition of such days varies over time, according to the vagaries of political expediency, and any list prepared for this book would be out of date by the time it was published. It is necessary to refer to the Secretary of State, typically, in a given State for a definitive and current list of legal holidays. Various almanacs and source books also supply this information, but it may not be current in every case. |
|
|
|
|
|
|
|
|
This section illustrates a common problem which arises as a consequence of using different rules for defining days of observance. This problem is overlap and is significant in situations where days of observance must appear in chronological order. |
|
|
|
|
|
|
|
|
The State of Texas, as an example, defines several holidays. The first two (at the time of writing) are Confederate Heroes Day defined as occurring on 19 January, and Martin Luther King, Jr., Day, defined as occurring on the third Monday in January. |
|
|
|
|
|
|
|
|
The third Monday in January may fall on 15 January, at the earliest, and on 21 January, at the latest. Therefore, it may fall before, on or after 19 January. If a computer-based application requires a list of holidays sorted by chronological order, it will be necessary to recognize the problem of potential overlap and deal with it accordingly. |
|
|
|
|
|
|
|
|
See the application notes in section 6.4. for practical methods for dealing with this general problem. |
|
|
|
|
|
|
|
|
6.2.2.3
Last DOW of the Month |
|
|
|
|
|
|
|
|
The ecclesiastical calendar supplies an example of the last-DOW rule. |
|
|
|
|
|
|
|
|
The date for The Feast of Christ the King is celebrated on the last Sunday in October by the Roman Catholic Church and the last Sunday in August by Protestant churches. |
|
|
|
|
|
|
|
|
The feast is intended to honor Christ as" the ruler of all nations". |
|
|
|
|
|
|
|
|
There are several different approaches to coding this rule. One possibility is a simple loop, which starts at the end of the month and moves backwards, checking each date for its DOW, stopping at the first occurrence of the desired DOW, which will be the last such DOW in the given month. This approach is illustrated for the Protestant version of this day, as follows: |
|
|
|
|
|