[Date->HourOfDay] is an accessor for getting or setting the hourofday field for a date object.
Getting uses no parameters and returns the hourofday as an integer.
Setting requires an integer parameter, and supports the =, += and -= operators. Setting modifies the date object in-place, but does not return a value.
Date Object->hourofday Date Object->hourofday=Integer Date Object->hourofday+=Integer Date Object->hourofday-=Integer
Use the [Date->HourOfDay] method. The following example uses a single date object, then gets the hourofday and returns its value.
Next we set the hourofday field to a new value using the = operator, then set it again by adding 1 to the hourofday using the += operator, and set it once more by subtracting 1 from the hourofday using the -= operator. We return the result for each set operation.
local(d) = date('2011-02-21 08:00:00') #d->hourofday + '<br>' #d->hourofday=5 #d + '<br>' #d->hourofday+=1 #d + '<br>' #d->hourofday-=1 #d
8 2011-02-21 05:00:00 2011-02-21 06:00:00 2011-02-21 05:00:00
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.