[Date->Roll] adds a value to one or more of the fields of the date. Fields are specified as parameters to the tag and as many can be specified as desired. If a field overflows then other fields are not affected. For example, rolling 60 minutes doesn't change the date at all since the minute field will roll back to its original value and the hour field will not be modified. This method modifies the date object in-place and does not output a value.
Accepts any of the following keyword parameters: -year, -month, -week, -day, -hour, -minute, and -second.
Date Object->roll(-Keyword=Integer)
Use the [Date->Roll] method. The following example uses a single date object, then rolls the minutes and seconds fields, and outputs the result.
Code
local(d) = date('2011-02-21 08:00:00')
#d->roll(-minute=70,-second=80)
#d
Result
2011-02-21 08:10:20
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.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft
Recent Comments