[Date->DayOfYear] is an accessor for getting or setting the day of year field for a date object.
Getting uses no parameters and returns the day of year 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->dayofyear Date Object->dayofyear=Integer Date Object->dayofyear+=Integer Date Object->dayofyear-=Integer
Use the [Date->DayOfYear] method. The following example uses a single date object, then gets the day of year and returns its value.
Next we set the day of year field to a new value using the = operator, then set it again by adding 1 to the day of year using the += operator, and set it once more by subtracting 1 from the day of year using the -= operator. We return the result for each set operation.
local('d') = date('2011-02-21') #d->dayofyear + '<br>' #d->dayofyear=5 #d + '<br>' #d->dayofyear+=1 #d + '<br>' #d->dayofyear-=1 #d
52 2011-01-05 00:00:00 2011-01-06 00:00:00 2011-01-05 00: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.