STD.Date.IsUSDaylightSavingsInEffect([date])
| date | The date in Date_t format (YYYYMMDD). Optional; defaults to the current UTC date. |
| Return: | IsUSDaylightSavingsInEffect returns TRUE when U.S. daylight saving time is in effect for the specified date, otherwise FALSE. |
The IsUSDaylightSavingsInEffect function returns TRUE if daylight saving time is considered in effect for the specified date under U.S. Federal schedules (where those schedules existed), otherwise FALSE.
This function uses a date-only approximation. The start transition date is inclusive and the end transition date is exclusive. If hour-level precision is required around transition times, use timestamp and timezone rules instead.
Historical notes and limitations:
1967 and later follows Uniform Time Act schedules, including the 1974-1975 exceptions and the 1987 and 2007 rule changes.
1942-1945 models WWII "War Time" as DST in effect. The current implementation uses 1942-02-08 as the inclusive start date (one day before the historical start, 1942-02-09) and 1945-09-30 as the exclusive end date.
1920-1941 and 1946-1966 returns FALSE because DST was not federally standardized and varied by locality.
State and local exemptions are not modeled.
Example:
IMPORT STD; startOfDST := STD.Date.IsUSDaylightSavingsInEffect(20240310); endOfDST := STD.Date.IsUSDaylightSavingsInEffect(20241103); OUTPUT(startOfDST); //startOfDST is TRUE OUTPUT(endOfDST); //endOfDST is FALSE