Date Rules

A data rule is a specially formatted string used to indicate a day of the year for transitions, for example, transitions to or from Daylight Savings Time.

A date rule indicates dates such as "the second Sunday in April" or "the last Sunday in October". These are typical descriptions of daylight savings time transitions. Date rules consist of three subfields:

The "nth" weekday uses these values in the field designation:

1 - The first weekday of the month.

2 - The second weekday of the month

3 - The third weekday of the month.

4 - The fourth weekday of the month.

5 - The fifth weekday of the month.

-1 - The last weekday of the month.

The "day of the week" is indicated by the values 0 to 6:

0 - Sunday.

1 - Monday.

2 - Tuesday.

3 - Wednesday.

4 - Thursday.

5 - Friday.

6 - Saturday.

The month is indicated by numerical values:

1 - January.

2 - February.

...

12 - December.

All date rules must have all three fields (weekday, day of week, and month). Each field is separated by a semi-colon (';') character. No spaces or other characters are allowed in a date rule. Double quotes around the fields are not required.

Here are some examples of date rules:

"-1;5;9" = The last Friday in September.

"2;1;3" = The second Monday in March.