com.vaadin.util.
Class TimeZoneUtil
- java.lang.Object
-
- com.vaadin.util.TimeZoneUtil
-
All Implemented Interfaces:
public final class TimeZoneUtil extends Object implements Serializable
Utilities related to
com.google.gwt.i18n.client.TimeZone
.Since:
8.2
Author:
Vaadin Ltd
See Also:
-
-
Method Summary
All Methods Modifier and Type Method Description static String
toJSON(ZoneId zoneId, Locale locale)
Returns a JSON string of the specified
zoneId
andLocale
, which is used incom.google.gwt.i18n.client.TimeZone.createTimeZone(String)
.static String
toJSON(ZoneId zoneId, Locale locale, int startYear, int endYear)
Returns a JSON string of the specified
zoneId
andLocale
, 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 specified
zoneId
andLocale
, 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
- theZoneId
to get the daylight transitions fromlocale
- the locale used to determine the short name of the time zoneReturns:
the encoded string
See Also:
-
toJSON
public static String toJSON(ZoneId zoneId, Locale locale, int startYear, int endYear)
Returns a JSON string of the specified
zoneId
andLocale
, which is used incom.google.gwt.i18n.client.TimeZone.createTimeZone(String)
. This method calculates the JSON string fromstartYear
untilstartYear
, both inclusive.Parameters:
zoneId
- theZoneId
to 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 transitionsReturns:
the encoded string
Since:
8.11
-
-