ydn2md: Convert from year and day number of year to month and day of...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Convert from year and day number of year to month and day of month

Usage

1
ydn2md(yr, dy)

Arguments

yr

4-digit year (like 1988), integer, scalar

dy

day number in year (like 310), integer, scalar or vector

Details

Conversion in the opposite direction is given by function ymd2dn.

On error, the function returns

1
m = d = -1

.

Value

m

month number, integer (1-12)

d

day of month, integer (1-31)

Author(s)

Adapted from Johns Hopkins University/Applied Physics Laboratory

R adaptation by Arnab Chakraborty (June 2013)

See Also

ymd2dn

Examples

1
2
3
4
#  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))

astrolibR documentation built on May 2, 2019, 3:26 a.m.