Package com.vaadin.util
Class TimeZoneUtil
- java.lang.Object
-
- com.vaadin.util.TimeZoneUtil
-
- All Implemented Interfaces:
Serializable
public final class TimeZoneUtil extends Object implements Serializable
Utilities related tocom.google.gwt.i18n.client.TimeZone.- Since:
- 8.2
- Author:
- Vaadin Ltd
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringtoJSON(ZoneId zoneId, Locale locale)Returns a JSON string of the specifiedzoneIdandLocale, which is used incom.google.gwt.i18n.client.TimeZone.createTimeZone(String).static StringtoJSON(ZoneId zoneId, Locale locale, int startYear, int endYear)Returns a JSON string of the specifiedzoneIdandLocale, which is used incom.google.gwt.i18n.client.TimeZone.createTimeZone(String).
-
-
-
Method Detail
-
toJSON
public static String toJSON(ZoneId zoneId, Locale locale)
Returns a JSON string of the specifiedzoneIdandLocale, which is used incom.google.gwt.i18n.client.TimeZone.createTimeZone(String). This method calculates the JSON string from the year 1980 until 20 years into the future from the current date.- Parameters:
zoneId- theZoneIdto get the daylight transitions fromlocale- the locale used to determine the short name of the time zone- Returns:
- the encoded string
- See Also:
toJSON(ZoneId, Locale, int, int)
-
toJSON
public static String toJSON(ZoneId zoneId, Locale locale, int startYear, int endYear)
Returns a JSON string of the specifiedzoneIdandLocale, which is used incom.google.gwt.i18n.client.TimeZone.createTimeZone(String). This method calculates the JSON string fromstartYearuntilstartYear, both inclusive.- Parameters:
zoneId- theZoneIdto get the daylight transitions fromlocale- the locale used to determine the short name of the time zonestartYear- the start year of DST transitionsendYear- the end year of DST transitions- Returns:
- the encoded string
- Since:
- 8.11
-
-