[Duration->forEachDay] performs a block of code for each day between the start and end date in a duration object.
Duration Object->ForEachDay => {
Code Block
}
Use the [Duration->ForEachDay] method. The following example takes two dates in a duration object, then performs a code block for each day, formatting the date as indicated.
Code
local(d) = duration(date('2011-02-21 08:00:00'),date('2011-02-24 12:00:00'))
#d->forEachDay => {^
(#1)->format('%A, %B %-d, %Y') + '<br>'
^}
Result
Monday, February 21, 2011 Tuesday, February 22, 2011 Wednesday, February 23, 2011 Thursday, February 24, 2011
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