DAYSTODATE Procedure (PV-WAVE Advantage)
Gives the date corresponding to the number of days since January 1, 1900.
Usage
DAYSTODATE, days, day[, month[, year]]
Input Parameters
days—Number of days since January 1, 1900.
Output Parameters
day—On return, this named variable is assigned the day of the date specified by days.
month—If present, on return, this named variable is assigned the month of the date specified by days.
year—If present, on return, this named variable is assigned the year of the date specified by days. The year 1950 corresponds to the year 1950 A.D., and the year 50 corresponds to year 50 A.D.
Discussion
Procedure DAYSTODATE computes the date corresponding to the number of days since January 1, 1900. For a negative input value of days, the date computed is prior to January 1, 1900. This procedure is the inverse of PV‑WAVE Advantage function DATETODAYS.
The Gregorian calendar’s first day after October 4, 1502, which became October 15, 1582. Prior to that, the Julian calendar was in use.
Example
The following example uses DAYSTODATE to compute the date for the 100th day of 1986. This is accomplished by first using function DATETODAYS to get the “day number” for December 31, 1985.
d0 = DATETODAYS(31, 12, 1985)
DAYSTODATE, d0 + 100, d, m, y
PM, d, m, y, Title = 'Day 100 of 1986 is (day-month-year)', $
Format = '(20x, i3, i4, i7)'
Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.