Difference between revisions of "GetTimezonesUtility"
From AgileApps Support Wiki
imported>Aeric m (Text replace - 'getTimezonesUtility(' to 'Functions.getTimezonesUtility(') |
imported>Aeric |
||
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> | ;Syntax:<pre>Map Functions.getTimezonesUtility()</pre> | ||
;Return:<tt>Map</tt> | ;Return:<tt>Map</tt> | ||
;Example:Retrieve a list of all timezones | ;Example:Retrieve a list of all timezones | ||
Line 8: | Line 8: | ||
:<syntaxhighlight lang="java" enclose="div"> | :<syntaxhighlight lang="java" enclose="div"> | ||
Functions.debug("Retrieve time zone list"); | Functions.debug("Retrieve time zone list"); | ||
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(); | ||
Functions.debug("code: "+ tz.getId() + "; value: "+ tz.getJavaValue() + "; user friendly value: "+ tz.getUserFriendlyValue()); | Functions.debug("code: "+ tz.getId() + "; value: "+ tz.getJavaValue() | ||
+ "; user friendly value: "+ tz.getUserFriendlyValue()); | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<noinclude> | |||
[[Category:Utility]] | |||
</noinclude> |
Revision as of 22:55, 23 July 2013
- Functions.getTimezonesUtility()
- Description
- Retrieves the list of time zones via the Java API
- Syntax
Map Functions.getTimezonesUtility()
- Return
- Map
- Example
- Retrieve a list of all timezones
- Learn more: Time Zone Codes
- <syntaxhighlight lang="java" enclose="div">
Functions.debug("Retrieve time zone list"); Map<String, TimeZoneBean> timezoneCollection = Functions.getTimezonesUtility(); for(Map.Entry e : timezoneCollection.entrySet()) {
TimeZoneBean tz = e.getValue(); Functions.debug("code: "+ tz.getId() + "; value: "+ tz.getJavaValue() + "; user friendly value: "+ tz.getUserFriendlyValue());
} </syntaxhighlight>