What people use it for
- Packaging codes A carton stamped 2026185 was packed on day 185 of 2026, which is July 4.
- Logs and feeds Weather and satellite files quote dates as YYYYDDD. Turn one into a calendar date.
- Planning See how much of the year is left without counting months on your fingers.
What the day of the year is
The day of the year is the position of a date inside its own year, counted from 1. January 1 is day 1, February 1 is day 32, and December 31 is day 365, or 366 in a leap year. ISO 8601 writes it as YYYY-DDD, so April 10, 2026 is 2026-100. Every date after February 28 sits one day higher in a leap year, which is where a hand count goes wrong.
It is not the Julian day. The astronomical Julian Day is a continuous count that started in 4713 BC and has nothing to do with the calendar year, even though shipping labels call their three digit code a Julian date.
The code on the box
Food, medicine and hardware cartons carry a short code such as 2026185: four digits for the year and three for the day of the year. Reading one back is not obvious, which is why the second box takes a list of them. Paste a column from a spreadsheet, separated by commas, and every code comes back as a calendar date with its week number.
| Date | Day | Code |
|---|---|---|
| 2026-01-01 | 1 of 365 | 2026001 |
| 2026-07-04 | 185 of 365 | 2026185 |
| 2026-12-31 | 365 of 365 | 2026365 |
| 2024-12-31 | 366 of 366 | 2024366 |