net.sf.saxon.number
public class NamedTimeZone extends Object
Field Summary | |
---|---|
static HashMap<String,List<String>> | idForCountry |
Method Summary | |
---|---|
static int | civilTimeOffset(DateTimeValue date, String olsenName)
Get the civil time offset to be made to a given date/time in a given
civil timezone. |
static String | formatTimeZoneOffset(DateTimeValue timeValue)
Format a timezone in numeric form for example +03:00 (or Z for +00:00) |
static String | getOlsenTimeZoneName(DateTimeValue date, String country)
Try to identify a timezone name corresponding to a given date (including time zone)
and a given country. |
static String | getTimeZoneNameForDate(DateTimeValue date, String country)
Try to identify a timezone name corresponding to a given date (including time zone)
and a given country. |
static Boolean | inSummerTime(DateTimeValue date, String region)
Determine whether a given date/time is in summer time (daylight savings time)
in a given region. |
static void | tz(String country, String zoneId)
Register a timezone in use in a particular country. |
Parameters: date the date/time in question. If this has no timezone, it is assumed to be in GMT. olsenName the Olsen name of the timezone, for example Europe/Lisbon
Returns: the civil time offset, in milliseconds, to be applied to the given date/time
Parameters: timeValue the value whose timezone is to be formatted
Returns: the formatted timezone
Parameters: date the dateTimeValue, including timezone country the country, as a two-letter code
Returns: the Olsen timezone name if a timezone with the given time displacement is in use in the country in question (on the appropriate date, if known). In this case an asterisk is appended to the result if the date/time is in daylight savings time. Otherwise, the formatted (numeric) timezone offset. If the dateTimeValue supplied has no timezone, return a zero-length string.
Parameters: date the dateTimeValue, including timezone country the two-letter ISO country code
Returns: the short timezone name if a timezone with the given time displacement is in use in the country in question (on the appropriate date, if known). Otherwise, the formatted (numeric) timezone offset. If the dateTimeValue supplied has no timezone, return a zero-length string.
Parameters: date the date/time in question region either the two-letter ISO country code, or an Olsen timezone name such as "America/New_York" or "Europe/Lisbon". If the country code denotes a country spanning several timezones, such as the US, then one of them is chosen arbitrarily.
Returns: true if the date/time is known to be in summer time in the relevant country; false if it is known not to be in summer time; null if there is no timezone or if no information is available for the specified region.
Parameters: country the two-character code for the country zoneId the Olsen timezone name for the timezone