How to convert day of year (DOY) to date

There isn’t currently a format character for parsing the DOY, but you can pretty easily work around this by using the builtin Date + Period math:

julia> Date("2021") + Day(146)
2021-05-27

Date("2021") will parse as 2021-01-01, then you’re adding 146 Days to that date.

6 Likes