Difference between revisions of "Common Methods Object"
Line 19: | Line 19: | ||
'''Returns:''' | '''Returns:''' | ||
: true if the value date is between the start and stop dates, otherwise returns false. | : true if the value date is between the start and stop dates, otherwise returns false. | ||
+ | |||
+ | |||
+ | == <code>asynchttpGet</code> == | ||
+ | |||
+ | Send an http GET request and return control to the calling code. Any response from the call will be passed to the callback method. | ||
+ | |||
+ | '''Signature:''' = null | ||
+ | void asynchttpGet(callbackMethod, Map params, Map data = null) | ||
+ | |||
+ | '''Parameters:''' | ||
+ | |||
+ | : callbackMethod - The name of a callback method to send the response to. Can be null if the response can be ignored. | ||
+ | : params - the parameters to use to build the http GET call. | ||
+ | : data - optional data to be passed to the callback method. |
Revision as of 17:45, 15 September 2018
These methods can be used in both Apps and Drivers
timeOfDayIsBetween
Check if a date is between two dates.
Signature:
boolean timeOfDayIsBetween(Date start, Date stop, Date value[, TimeZone timeZone])
Parameters:
- start - The date to start comparison against.
- stop - The date to stop comparison against.
- value - The date to compare
- timezone - (Optional) The timezone to use for the comparison
Returns:
- true if the value date is between the start and stop dates, otherwise returns false.
asynchttpGet
Send an http GET request and return control to the calling code. Any response from the call will be passed to the callback method.
Signature: = null
void asynchttpGet(callbackMethod, Map params, Map data = null)
Parameters:
- callbackMethod - The name of a callback method to send the response to. Can be null if the response can be ignored.
- params - the parameters to use to build the http GET call.
- data - optional data to be passed to the callback method.