spacepy.time.doy2date

spacepy.time.doy2date(year, doy, dtobj=False, flAns=False)[source]

convert integer day-of-year doy into a month and day after http://pleac.sourceforge.net/pleac_python/datesandtimes.html

Parameters
yearint or array of int

year

doyint or array of int

day of year

Returns
monthint or array of int

month as integer number

dayint or array of int

as integer number

See also

Ticktock.getDOY

Examples

>>> month, day = doy2date(2002, 186)
>>> dts = doy2date([2002]*4, range(186,190), dtobj=True)