ymd2dn {astrolibR} | R Documentation |
Convert from year, month, day to day number of year
ymd2dn(yr, m, d)
yr |
4-digit year (like 1988), integer, scalar or vector |
m |
month number, integer (1-12), scalar or vector |
d |
day of month, integer (1-31), scalar or vector |
On error, the function returns
m = d = -1
.
Conversion in the opposite direction is given by function ydn2md.
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory This software may be used, copied, or redistributed as long as it is not sold and this copyright notice is reproduced on each copy made. This routine is provided as is without any express or implied warranties whatsoever. Other limitations apply as described in the file disclaimer.txt.
dy |
day number in year, integer (1-365), scalar or vector |
Written by R. Sterner, JHU/APL 1985
Adapted to IDL by W. Landsman 1998
R adaptation by Arnab Chakraborty (June 2013)
# Find the days of the year for June 4 and September 12 in the year 2001 # Result: days 155 and 255 ymd2dn(2001, c(6,9), c(4,12))