# Julian Date

Key: `datetime.date.julian`

Short-form Julian date with 2-digit year and 3-digit day-of-year. Common in manufacturing, logistics, and food expiration dates.

Page: <https://meridian.online/docs/projects/finetype/types/datetime/date/julian>

Samples: `24-015`, `23-365`

## Background

### Origin

Ordinal date is the preferred name for what was formerly called the "Julian date".[[1]](https://en.wikipedia.org/wiki/Ordinal_date) The astronomical Julian day number is based on the Julian period proposed by Joseph Scaliger in 1583.[[2]](https://en.wikipedia.org/wiki/Julian_day)

Outside astronomy, the term Julian date may refer to the day-of-year number in the Gregorian calendar, especially in computer programming, the military and the food industry.[[2]](https://en.wikipedia.org/wiki/Julian_day) Wikipedia notes that the terms "ordinal date" or "day-of-year" are preferred because "Julian date" can mean several different things.[[2]](https://en.wikipedia.org/wiki/Julian_day)

Markus Kuhn's summary of ISO 8601 gives 1995-035 or 1995035 as the standard notation for day 035 of 1995, which is 1995-02-04.[[3]](https://www.cl.cam.ac.uk/~mgk25/iso-time.html)

### Use

IBM's Db2 for i documentation lists a Julian date format, \*JUL, written yy/ddd, with the example 87/285.[[4]](https://ibm.com/docs/th/ssw_ibm_i_74/db2/rbafzdatestrings.htm) Db2 for i also recognises an unformatted Julian date written yyyyddd, with the example 1987285.[[4]](https://ibm.com/docs/th/ssw_ibm_i_74/db2/rbafzdatestrings.htm) In Db2 for i, the separators for two-digit year formats are controlled by the date separator (DATSEP) parameter.[[4]](https://ibm.com/docs/th/ssw_ibm_i_74/db2/rbafzdatestrings.htm) If a file of yy-ddd values comes from an IBM midrange system, it is worth asking whether it is the \*JUL format with a hyphen set as its separator. (Meridian's view)

The University of Nebraska–Lincoln's food pages explain that the three-digit pack date on an egg carton counts the days of the year, starting with January 1 as 001.[[5]](https://food.unl.edu/article/cracking-date-code-egg-cartons/)

Python's time module documents that two-digit years parsed with %y follow the POSIX and ISO C rule: values 69–99 map to 1969–1999, and values 0–68 map to 2000–2068.[[6]](https://docs.python.org/3/library/time.html)

## Sources

1. [Ordinal date - Wikipedia](https://en.wikipedia.org/wiki/Ordinal_date) — secondary source
2. [Julian day - Wikipedia](https://en.wikipedia.org/wiki/Julian_day) — secondary source
3. [International standard date and time notation](https://www.cl.cam.ac.uk/~mgk25/iso-time.html) — secondary source
4. [Date strings](https://ibm.com/docs/th/ssw_ibm_i_74/db2/rbafzdatestrings.htm) — documentation
5. [Cracking the Date Code on Egg Cartons \| UNL Food \| Nebraska](https://food.unl.edu/article/cracking-date-code-egg-cartons/) — secondary source
6. [time — Time access and conversions — Python 3.15.0 documentation](https://docs.python.org/3/library/time.html) — documentation
