saxon:in-summer-time
Determines whether a given date/time is in summer-time (daylight savings time).
in-summer-time($date as xs:dateTime, $region as xs:string) ➔ xs:boolean
Arguments | |||
| $date | xs:dateTime | The input date/time |
| $region | xs:string | The country code or Olson timezone name |
Result | xs:boolean |
Namespace
http://saxon.sf.net/
Notes on the Saxon implementation
Available since Saxon 9.1.
Details
The $region
argument may either be an ISO two-letter country code (for
example de
or es
), or an Olson timezone name (such as
America/New_York
or Europe/Lisbon
). The function returns
true if the given date/time is in summer time (daylight savings time) in that country or
timezone, as far as can be determined from the Java timezone database. If the
information is not available the function either returns false or an empty sequence.
If a country code is specified for a country that spans different timezones with different daylight savings rules (for example, the US), then one timezone in that country is chosen arbitrarily.
For reliable results, the supplied date/time should include a timezone. This does not
need to correspond to the timezone named in the second argument; it is there purely to
ensure that $date
represents a single point in time unambiguously.