[Date->JulianDay] is an accessor for getting or setting the Julian day. The Julian day number is the integer part of the Julian date, or the interval of time in days since January 1, 4713 BC Greenwich noon, Julian proleptic calendar.
Getting uses no parameters and returns the local Julian day 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->julianday
Date Object->julianday=Integer
Date Object->julianday+=Integer
Date Object->julianday-=Integer
Use the [Date->JulianDay] method. The following example uses a single date object, then gets the julianday and returns its value.
Next we set the julianday field to a new value using the = operator, then set it again by adding 1 to the julianday using the += operator, and set it once more by subtracting 1 from the julianday using the -= operator. We return the result for each set operation.
Code
local(d) = date('2011-02-21 08:00:00')
#d->julianday + '<br>'
#d->julianday=2455616
#d + '<br>'
#d->julianday+=1
#d + '<br>'
#d->julianday-=1
#d
Result
2455614 2011-02-23 08:00:00 2011-02-24 08:00:00 2011-02-23 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.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft
Recent Comments