Difference between revisions of "GetTimezonesUtility"
From AgileApps Support Wiki
imported>Aeric |
imported>Aeric |
||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
:<tt>Functions.getTimezonesUtility()</tt> | :<tt>Functions.getTimezonesUtility()</tt> | ||
;Description:Retrieves the list of time zones <noinclude>via the [[Java API]]</noinclude> | ;Description:Retrieves the list of time zones <noinclude>via the [[Java API]]</noinclude> | ||
;Syntax:<pre>Map m = Functions.getTimezonesUtility();</pre> | ;Syntax:<pre>Map<String, TimeZoneBean> m = Functions.getTimezonesUtility();</pre> | ||
;Return:<tt>Map</tt> | ;Return:<tt>Map<String, TimeZoneBean></tt> | ||
;Example:Retrieve a list of all timezones | ;Example:Retrieve a list of all timezones | ||
:''Learn more: [[Time Zone Codes]]'' | :''Learn more: [[Time Zone Codes]]'' | ||
:<syntaxhighlight lang="java" enclose="div"> | :<syntaxhighlight lang="java" enclose="div"> | ||
Logger.info("Retrieve time zone list", "TimeZones"); | |||
Map<String, TimeZoneBean> timezoneCollection = Functions.getTimezonesUtility(); | Map<String, TimeZoneBean> timezoneCollection = Functions.getTimezonesUtility(); | ||
for(Map.Entry e : timezoneCollection.entrySet()) | for(Map.Entry e : timezoneCollection.entrySet()) | ||
{ | { | ||
TimeZoneBean tz = e.getValue(); | TimeZoneBean tz = e.getValue(); | ||
Logger.info("code: "+ tz.getId() + "; value: "+ tz.getJavaValue() | |||
+ "; user friendly value: "+ tz.getUserFriendlyValue()); | + "; user friendly value: "+ tz.getUserFriendlyValue(), "TimeZones"); | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 01:31, 10 September 2013
- Functions.getTimezonesUtility()
- Description
- Retrieves the list of time zones via the Java API
- Syntax
Map<String, TimeZoneBean> m = Functions.getTimezonesUtility();
- Return
- Map<String, TimeZoneBean>
- Example
- Retrieve a list of all timezones
- Learn more: Time Zone Codes
- <syntaxhighlight lang="java" enclose="div">
Logger.info("Retrieve time zone list", "TimeZones"); Map<String, TimeZoneBean> timezoneCollection = Functions.getTimezonesUtility(); for(Map.Entry e : timezoneCollection.entrySet()) {
TimeZoneBean tz = e.getValue(); Logger.info("code: "+ tz.getId() + "; value: "+ tz.getJavaValue() + "; user friendly value: "+ tz.getUserFriendlyValue(), "TimeZones");
} </syntaxhighlight>