Date functions

Date functions compute and convert Gregorian dates to and from Julian day numbers.

"Julian day" refers to a continuous count of days since November 24, 4714 BC. For example, the Julian day number 2,451,545 is equivalent to a Gregorian date of January 1, 2000. The Gregorian calendar is also known as the Western calendar. The benefit of using the Julian day number is that simple arithmetic operations such as addition, subtraction, multiplication, and division can easily be performed on Julian dates. For instance, the following line converts January 15, 2012 to a Julian day number, adds 5 days, and converts the result back to a Gregorian date (January 20, 2012).
                     name       value
local variable       d          #fd (d (2012, 01, 15) + 5)

The action line above assigns the value 2012-01-20 to local variable d.