Converts day of year (DoY) values to date values.
DOY2DATE(date, year)
(date, time) = DOY2DATE(doy, year)
date |
- |
An integer or series, the input day of year. |
year |
- |
Optional. An integer or series. The year for each DOY value. If a single value, the year is used for each DOY value. Defaults to the current year. |
A series or array of date values.
(date, time) = DOY2DATE(doy, year) returns the date and time in two separate variables.
W1: doy2date(1, 2030)
W1 == {1/1/2030}
W1 represents the date of the first day of 2030.
W1: doy2date(1.5, 2030)
W1 == {{1/1/2030}, {12:00:00}}
W1 represents the date and time of the first day of 2030 at noon.
(d, t) = doy2date(1.5, 2030)
d == {1/1/2030}
t == {12:00:00}
Same as above, except the date and time values are returned in two separate variables.
W2: ymd2date({{2030, 1, 1},
{2030, 2, 1},
{2030, 3, 1},
{2030, 4, 1}})
W3: date2doy(w2)
W4: doy2date(w3, 2030)
W3 == {1, 32, 60, 91}
W4 == {1/01/2030, 2/02/2030, 3/01/2030, 4/01/2030}
Demonstrates that DATE2DOY and DOY2DATE are inverse functions.
DOY2DATE converts a day of year value the equivalent date series. Each input day of year is an integer between 1 and 366 where 1 represents day 1 or January 1.
If DOY is fractional, DOY2DATE also returns a time value representing the fraction of the day elapsed.
See DATE2DOY to convert a date series to the equivalent day of year series.