[Date->DOWLocal] is an accessor for getting or setting the day of week local field for a date object. This will be a value from 1 to 7 inclusive, with 1 being the localized first day of the week.
Getting uses no parameters and returns the local day of week 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.
Note that setting the dowlocal field takes the date object's current value into account and start from the first day of the week, e.g. setting a date object's dowlocal field to 5 will set the date to the fifth day starting from the first day of the week.
Date Object->dowlocal Date Object->dowlocal=Integer Date Object->dowlocal+=Integer Date Object->dowlocal-=Integer
Use the [Date->DOWLocal] method. The following example uses a single date object, then gets the dowlocal and returns its value.
Next we set the dowlocal field to a new value using the = operator, then set it again by adding 1 to the dowlocal using the += operator, and set it once more by subtracting 1 from the dowlocal using the -= operator. We return the result for each set operation.
local(d) = date('2011-02-21 08:00:00') #d->dowlocal + '<br>' #d->dowlocal=5 #d + '<br>' #d->dowlocal+=1 #d + '<br>' #d->dowlocal-=1 #d
2 2011-02-24 08:00:00 2011-02-25 08:00:00 2011-02-24 08: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.