ydn2md {astrolibR} | R Documentation |
Convert from year and day number of year to month and day of month
ydn2md(yr, dy)
yr |
4-digit year (like 1988), integer, scalar |
dy |
day number in year (like 310), integer, scalar or vector |
Conversion in the opposite direction is given by function ymd2dn.
On error, the function returns
m = d = -1
.
m |
month number, integer (1-12) |
d |
day of month, integer (1-31) |
Adapted from Johns Hopkins University/Applied Physics Laboratory
R adaptation by Arnab Chakraborty (June 2013)
# Find the month/day of days 155 and 255 in the year 2001 # Result: m=c(6,9) d=c(4,12), or June 4 and September 12 ydn2md(2001, c(155,255))