Rata Die (RD): Fixed Day Numbers for Calendar Conversion
Rata Die (RD) is a simple count of days in which day 1 is 1 January of year 1 CE in the proleptic Gregorian calendar. It was popularised by Edward Reingold and Nachum Dershowitz in Calendrical Calculations, where every calendar is converted to and from this single fixed day number. Because it is a plain integer that starts at midnight, it is one of the easiest day counts to use in software.
- Type
- Continuous day count
- RD 1
- Monday, 1 January 1 CE (proleptic Gregorian)
- Day begins
- At midnight
- RD of 1 January 2000
- 730,120
- RD of the Unix epoch
- 719,163
- Relation to Julian Day
- RD = JDN − 1,721,425
Definition
A Rata Die, Latin for fixed date, is an integer that names one whole day. RD 1 is 1 January 1 CE in the Gregorian calendar extended backwards (proleptically) before its introduction in 1582. RD 0 is the day before, 31 December 1 BCE, and earlier days have negative numbers. There is no gap or special case anywhere in the count.
In the proleptic Julian calendar, RD 1 falls on 3 January 1 CE, and 1 January 1 CE in the Julian calendar is RD −1, because the two calendars differed by two days at that time.
| Date (Gregorian unless noted) | Rata Die |
|---|---|
| 31 December 1 BCE | 0 |
| 1 January 1 CE | 1 |
| 31 December 1 CE | 365 |
| 1 January 1 CE (Julian) | −1 |
| 15 October 1582 | 577,736 |
| 22 September 1792 | 654,415 |
| 1 January 1970 | 719,163 |
| 1 January 2000 | 730,120 |
| 1 January 2026 | 739,617 |
Reingold, Dershowitz and Calendrical Calculations
Edward M. Reingold and Nachum Dershowitz, both computer scientists, published a series of papers and then the book Calendrical Calculations (Cambridge University Press), which has gone through several editions. The book gives precise algorithms for dozens of calendars, including the Gregorian, Julian, Islamic, Hebrew, Persian, Chinese, Hindu, Mayan and many historical systems, all expressed through the same fixed day number. They call this number the fixed date, and the convention that RD 1 is 1 January 1 CE (Gregorian) is theirs.
This site uses the same convention, and several of its epochs, such as those of the Egyptian and Armenian calendars, match the values given in their book.
Why a fixed day number makes conversion easy
If you wanted to convert directly between every pair of calendars, the number of conversion routines would grow with the square of the number of calendars: 10 calendars would need 90 one-way converters. With a common day count, each calendar needs only two functions: one from its date to the fixed day number and one back. Converting from calendar A to calendar B is then just A to RD, followed by RD to B.
A plain integer also makes other questions trivial. The number of days between two dates is the difference of their RD values. Adding 100 days to a date is adding 100 to its RD. The weekday is RD mod 7, where 0 is Sunday, 1 is Monday and so on; RD 730,120 mod 7 is 6, and 1 January 2000 was a Saturday.
| Calendars supported | Direct pairwise converters | Converters via a fixed day number |
|---|---|---|
| 5 | 20 | 10 |
| 10 | 90 | 20 |
| 50 | 2,450 | 100 |
Calendar epochs as Rata Die numbers
Once each calendar's first day is known as an RD value, many conversions reduce to simple arithmetic. For calendars with a fixed 365-day year, such as the Egyptian and classical Armenian calendars, the RD of any date is the epoch plus 365 times the elapsed years plus 30 times the elapsed months plus the elapsed days.
| Calendar | First day | Rata Die |
|---|---|---|
| Egyptian (Era of Nabonassar) | 26 February 747 BCE (Julian) | −272,787 |
| Julian | 1 January 1 CE (Julian) | −1 |
| Gregorian | 1 January 1 CE (Gregorian) | 1 |
| Armenian | 11 July 552 CE (Julian) | 201,443 |
| French Republican | 22 September 1792 | 654,415 |
| Modified Julian Day 0 | 17 November 1858 | 678,576 |
| Unix epoch | 1 January 1970 | 719,163 |
Relation to other day counts
All continuous day counts differ only by a constant and by the time of day at which they change. Rata Die changes at midnight, like the Modified Julian Day, whereas the Julian Day changes at noon.
The same numbering is built into some programming languages. In Python, the toordinal method of a date object returns exactly this number, with date(1, 1, 1) giving 1, and fromordinal converts it back.
| Count | Formula |
|---|---|
| Julian Day Number (noon) | JDN = RD + 1,721,425 |
| Julian Day at midnight | JD = RD + 1,721,424.5 |
| Modified Julian Day | MJD = RD − 678,576 |
| Days since the Unix epoch | RD − 719,163 |
| Unix time at midnight UTC | (RD − 719,163) × 86,400 |
Times of day and time zones
A Rata Die names a whole day, not an instant. Calendrical Calculations extends the idea to moments by adding a fraction of a day, so RD 730,120.5 is noon on 1 January 2000. The day boundary is local midnight; a Rata Die does not specify a time zone, so the same RD can refer to slightly different stretches of absolute time in different places.
Frequently asked questions
What does Rata Die mean?
It is Latin for fixed date. In calendar computation it means a day number counted from RD 1 = 1 January 1 CE in the proleptic Gregorian calendar.
What is RD 1?
RD 1 is Monday, 1 January 1 CE, in the Gregorian calendar extended backwards in time.
How do I convert Rata Die to a Julian Day?
Add 1,721,425 to get the Julian Day Number at noon, or add 1,721,424.5 for the Julian Day at the preceding midnight.
How do I find the weekday from a Rata Die?
Take RD mod 7: 0 is Sunday, 1 is Monday, through 6 for Saturday.
Is Rata Die the same as Python's date ordinal?
Yes. Python's date.toordinal() uses the same numbering, with 1 January of year 1 as day 1.
Sources and further reading
- Edward M. Reingold and Nachum Dershowitz, Calendrical Calculations: The Ultimate Edition (Cambridge University Press, 2018)
- Nachum Dershowitz and Edward M. Reingold, Calendrical Calculations, Software: Practice and Experience 20(9), 1990
- Python documentation, datetime: date.toordinal and date.fromordinal