IsDaylightSavingTime - Maple Help

Calendar

 IsDaylightSavingTime
 determine whether a date is in daylight saving time

 Calling Sequence IsDaylightSavingTime( d ) IsDaylightSavingTime( year, month, day ) IsDaylightSavingTime( year, month, day, timezone = TZ )

Parameters

 d - Date; the date year - integer; the year month - posint; the month day - posint; the day of the month TZ - string; time zone name

Description

 • The IsDaylightSavingTime( d ) command determines whether the Date object d is in daylight saving time.
 • The IsDaylightSavingTime( y, m, d, 'timezone' = TZ ) command determines whether the date indicated by the given year y, month m and day d, in the specified time zone TZ is on daylight saving time.
 • Note that the result of this command is expected to be accurate only for dates after the year $1970$, as historical information on daylight saving time transitions prior to that year are incomplete. For example, DST was first observed in Thunder Bay (then, Port Arthur) on 1908-08-01, but this information is not represented in the time zone database.
 • Furthermore, the time zone data upon which this command is based is only current as of the date of the time zone database used at release, but which is normally revised several times per year.

Examples

 > $\mathrm{with}\left(\mathrm{Calendar}\right):$
 > $\mathrm{IsDaylightSavingTime}\left(\mathrm{Date}\left(\right)\right)$
 ${\mathrm{false}}$ (1)
 > $d≔\mathrm{Date}\left(2000,6,1,\mathrm{timezone}="America/Toronto"\right):$
 > $\mathrm{IsDaylightSavingTime}\left(d\right)$
 ${\mathrm{true}}$ (2)
 > $d≔\mathrm{Date}\left(2000,6,1,\mathrm{timezone}="Canada/Saskatchewan"\right):$
 > $\mathrm{IsDaylightSavingTime}\left(d\right)$
 ${\mathrm{false}}$ (3)
 > $\mathrm{IsDaylightSavingTime}\left(2017,11,5,0,30,'\mathrm{timezone}'="America/Toronto"\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{IsDaylightSavingTime}\left(2017,11,5,1,'\mathrm{timezone}'="America/Toronto"\right)$
 ${\mathrm{false}}$ (5)
 > $\mathrm{IsDaylightSavingTime}\left(1916,4,30,'\mathrm{timezone}'="Europe/Berlin"\right)$
 ${\mathrm{false}}$ (6)
 > $\mathrm{IsDaylightSavingTime}\left(1916,5,1,'\mathrm{timezone}'="Europe/Berlin"\right)$
 ${\mathrm{true}}$ (7)

Compatibility

 • The Calendar[IsDaylightSavingTime] command was introduced in Maple 2018.