In most of North America, Daylight Saving Time is in effect from the
second Sunday in March until the first Sunday in November. The
following few lines of BASIC calculate these dates for any year, from
2007 onward. Prior to 2007, different rules were in effect.
--------------------------------------------
' DSTDATE.BAS
' Calculates start and end dates of Daylight Saving Time
' David Williams, 2002
' Modified for new DST rules, 2006
DEFINT A-Z
CLS
INPUT "Year"; Y
IF Y < 2007 THEN BEEP: PRINT "Not valid before 2007": END
B = 7 - (2 + Y + Y \ 4 - Y \ 100 + Y \ 400) MOD 7
PRINT "In most of North America, in the year"; STR$(Y);
PRINT ", clocks are set ahead on March"; STR$(7 + B); ","
PRINT "and back on November"; STR$(B);
PRINT ". Both dates are Sundays."
END
------------------------------------------------------------
Note that there are a few places in North America, such as the Canadian
province of Saskatchewan, where Daylight Saving Time is not used.
Clocks there show Standard Time year-round. Also, other parts of the
world have different rules, so clocks there are changed on different
dates.
Nowadays, North American clocks "spring ahead" in wintertime!
dow


|