-> Here in Europe, it is from the last sunday in march to the last sunday
-> in october.
OK. Here's a version of the program for Europeans.
-----------------------------------------------------
' DSTDATE.BAS
' Calculates start and end dates of Daylight Saving Time
' David Williams, 2002
' Modified for European rules (last Sundays of March and Oct)
' This version March 2008.
DEFINT A-Z
CLS
INPUT "Year"; Y
Q = Y + Y \ 4 - Y \ 100 + Y \ 400
F = 31 - (Q + 5) MOD 7
B = 31 - (Q + 2) MOD 7
PRINT "In the year"; STR$(Y); ", clocks are set ahead on"
PRINT "March"; STR$(F); ", and back on October"; STR$(B); "."
PRINT "Both dates are Sundays."
END
------------------------------------------------------
It's slightly more complex than the North American version. In any
year, March and November, the months when North American clocks are
changed, start on the same day of the week. This allows most of the
calculation to be done only once. This accidental simplification
doesn't happen in this European version.
dow