Pick a date and the calculator returns its ISO 8601 ordinal-date form: YYYY-DDD where DDD is the zero-padded day-of-year (001 through 365 or 366). This is the short ISO date format used by satellite, weather, and aviation systems where space matters and month/day decomposition is unnecessary. April 27, 2026 becomes 2026-117. The format is sortable as a string, time-zone independent, and exactly seven characters after the dash. For the day-of-year integer alone (without the YYYY prefix or hyphen), see day of year; for the standard week-of-year, see week of year.
Common use cases
- Tagging filenames with a sortable date. Filenames like `report-2026-117.csv` sort lexically the same way they sort chronologically. The ordinal form is shorter than `report-2026-04-27.csv` (8 chars instead of 10) and equivalent in semantics. Mass-rename a folder of dated files into ordinal form and your file manager will show them in time order without needing date-aware sorting.
- Reading aviation METAR/TAF dates. Aviation weather reports timestamp observations with the ordinal-date format prefixed by the year (sometimes 2-digit). The forecast issued at 12:00Z on day 117 of 2026 is `2026117/12:00`. Look up an observation's date by entering the ordinal form into reverse-direction tools, or use this calculator to encode a date you want to query.
- Indexing a year of daily logs. A daily-log directory named `logs/2026-001/`, `logs/2026-002/`, ... `logs/2026-365/` is unambiguous, sortable, and avoids dependence on whether your shell understands month names. Use the calculator to convert today's date into the right path component.
- Tracking satellite or earth-observation data. NASA, NOAA, and ESA data products frequently embed the ordinal date in filenames (e.g. `MODIS_2026117_terra.hdf`). Decode unfamiliar files by converting the ordinal date back to YYYY-MM-DD; encode by entering your target calendar date here.
How it works
The calculator parses your input as a UTC date and asks date-fns to format it with the 'yyyy-DDD' token, which produces the ISO 8601 ordinal short form. The DDD token gives 3-digit zero-padded day-of-year (001 for January 1, 366 for December 31 of a leap year). The 'useAdditionalDayOfYearTokens' option must be enabled for date-fns 2+ because the DDD token is opt-in. The output is always exactly 8 characters: YYYY + '-' + DDD.
Worked examples
A weekday in spring
Enter 2026-04-27.
Result: 2026-117
April 27, 2026 is day 117: 31 + 28 + 31 + 27 = 117. The result is sortable, unambiguous, and 8 characters wide.
New Year's Day, zero-padded
Enter 2026-01-01.
Result: 2026-001
January 1 is always day 001 (note the zero-padding to three digits). This is the convention NASA, NOAA, and almost every batch-processing system uses to make filenames sort correctly as strings.
Leap-year December 31
Enter 2024-12-31.
Result: 2024-366
2024 is a leap year, so December 31 is day 366. In non-leap years (e.g. 2025-12-31) the same date is day 365.
Edge cases & gotchas
- Always three digits, even for early-January dates. Day 5 is "005", not "5". The leading zeros are part of the standard. Some legacy tools strip them; if you're feeding the result into such a tool, you may need to remove the padding manually. Standards-compliant tools always require the padding.
- No "day 367" or "day 0". The format is bounded at 001–365 (366 in leap years). If you see a value outside that range in someone else's data, it's a bug, not a date — sometimes 0-indexed counts get exported by mistake.
- The standard separator is "-". ISO 8601 specifies a hyphen between the year and the day-of-year. Some legacy formats omit it (YYYYDDD) — that's technically valid in compact ISO 8601 forms but harder to read. The calculator always returns the hyphenated form, which is the most widely supported.
- Year boundaries are sharp. There's no overlap between 2026-365 and 2027-001 — they're adjacent calendar days, December 31 and January 1. The format does not have an "ISO ordinal year" concept the way ISO weeks do, so you don't have to worry about Jan 1 dates "belonging" to the previous year's count.
Frequently asked questions about Ordinal Date Calculator
Is "ordinal date" the same as "Julian date"?
No, but the names are sometimes confused. "Ordinal date" or "day-of-year" is the date's position within its calendar year (1–365/366). "Julian date" in astronomy is the continuous count of days since 4713 BC. Use the day-of-year tool for the former and the Julian day tool for the latter.
Why use ordinal date instead of YYYY-MM-DD?
When you don't need the month/day decomposition, the ordinal form is shorter (8 characters instead of 10) and often easier to compute with — adding 7 days is just adding 7 to the day-of-year, no month boundary logic. It's also unambiguous about leap-year shifts. Adopt it for filenames and batch processing where humans rarely look at the value directly.
How do I parse "2026-117" back into a calendar date?
Most languages ship a parser. In Python: `datetime.strptime("2026-117", "%Y-%j").date()` yields date(2026, 4, 27). In JavaScript with date-fns: `parse("2026-117", "yyyy-DDD", new Date(), { useAdditionalDayOfYearTokens: true })`. In a shell: `date -d "2026-01-01 +117 days -1 day"` (the -1 because adding 117 days lands on day 118).
What about pre-1582 dates?
The calculator applies the proleptic Gregorian rule to every date. Day-of-year values match what date-fns would compute for the proleptic Gregorian calendar. Historical dates recorded in the Julian calendar (used in Europe before October 1582 and in Russia until 1918) will have a different day-of-year if you compare against contemporaneous records.
What happens for years before AD 1?
date-fns supports years before AD 1 internally (year 0 = 1 BC astronomically), but the ordinal-date format is defined for AD years only. Stick to years ≥ 1 for predictable behavior; for ancient dates compute the day-of-year by hand using the Gregorian or Julian calendar rule as appropriate.
Can I write the year and day with no separator?
Yes — ISO 8601 allows a "basic" form without separators: YYYYDDD, e.g. 2026117. Many legacy systems (esp. NASA satellite data) use this form. The calculator returns the hyphenated "extended" form by default; remove the hyphen yourself for tools that expect the basic form.
Glossary
- Ordinal date
- ISO 8601 short form for a calendar date written as YYYY-DDD, where DDD is the zero-padded day-of-year (001–365 or 366). Sortable as a string, time-zone independent.
- Day-of-year (DOY)
- The 1-indexed position of a date within its calendar year. January 1 = 1; December 31 = 365 or 366. The integer that appears as the DDD portion of the ordinal date.
- Extended vs basic ISO 8601 form
- Extended form uses separators (e.g. 2026-04-27, 2026-117). Basic form omits them (20260427, 2026117). The calculator returns the extended form, which is more readable.
- Proleptic Gregorian calendar
- The Gregorian calendar projected backward in time before its 1582 introduction. Standard for software but disagrees with contemporaneous Julian-calendar records by 10–13 days.