AgileApps Support Wiki Pre Release

Difference between revisions of "GetTimezoneUtility"

From AgileApps Support Wiki
imported>Aeric
m (Text replace - 'getTimezoneUtility(' to 'Functions.getTimezoneUtility(')
 
imported>Aeric
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:getTimezoneUtility}}
{{DISPLAYTITLE:getTimezoneUtility}}
:<tt>Functions.getTimezoneUtility(String timezoneId)</tt>
;Description:Retrieves a time zone, based on a provided id <noinclude>via the [[Java API]]</noinclude>  
;Description:Retrieves a time zone, based on a provided id <noinclude>via the [[Java API]]</noinclude>  
;Syntax:<pre>Map Functions.getTimezoneUtility(String timezoneId)</pre>
;Syntax:<pre>TimeZoneBean tz = Functions.getTimezoneUtility(String timezoneId);</pre>
:Where <tt>timezoneId</tt> is a [[Time Zone Codes|Time Zone Code]]
:Where <tt>timezoneId</tt> is a [[Time Zone Codes|Time Zone Code]]
;Return:<tt>TimeZoneBean</tt>
;Return:<tt>TimeZoneBean</tt>
Line 8: Line 7:
;Example:Retrieve the time zone for <tt>timezoneId = 80</tt>
;Example:Retrieve the time zone for <tt>timezoneId = 80</tt>


<syntaxhighlight lang="java" enclose="div">
:<syntaxhighlight lang="java" enclose="div">
Functions.debug("Retrieve time zone 80);
Logger.info("Retrieve time zone 80", "TimeZones");
TimeZoneBean tz = Functions.getTimezoneUtility("80");
TimeZoneBean tz = Functions.getTimezoneUtility("80");
Functions.debug("code: "+ tz.getId() + "; value: "+ tz.getJavaValue() + "; user friendly value: "+ tz.getUserFriendlyValue());
Logger.info("code: "+ tz.getId() + "; value: "+ tz.getJavaValue()  
    + "; user friendly value: "+ tz.getUserFriendlyValue(), "TimeZones");
</syntaxhighlight>
</syntaxhighlight>


<noinclude>[[Category:Utility]]</noinclude>
<noinclude>[[Category:Utility]]</noinclude>

Latest revision as of 01:31, 10 September 2013

Description
Retrieves a time zone, based on a provided id via the Java API
Syntax
TimeZoneBean tz = Functions.getTimezoneUtility(String timezoneId);
Where timezoneId is a Time Zone Code
Return
TimeZoneBean
Example
Retrieve the time zone for timezoneId = 80
<syntaxhighlight lang="java" enclose="div">

Logger.info("Retrieve time zone 80", "TimeZones"); TimeZoneBean tz = Functions.getTimezoneUtility("80"); Logger.info("code: "+ tz.getId() + "; value: "+ tz.getJavaValue()

   + "; user friendly value: "+ tz.getUserFriendlyValue(), "TimeZones");

</syntaxhighlight>