Skip to content
dateconverts
TechnicalBy Afaq Zahir · Updated · 4 min read

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.

Rata Die values (checked with this site's converter)
Date (Gregorian unless noted)Rata Die
31 December 1 BCE0
1 January 1 CE1
31 December 1 CE365
1 January 1 CE (Julian)−1
15 October 1582577,736
22 September 1792654,415
1 January 1970719,163
1 January 2000730,120
1 January 2026739,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.

Conversion routines needed
Calendars supportedDirect pairwise convertersConverters via a fixed day number
52010
109020
502,450100

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.

Epochs of some calendars as fixed day numbers (consistent with this site's engine)
CalendarFirst dayRata Die
Egyptian (Era of Nabonassar)26 February 747 BCE (Julian)−272,787
Julian1 January 1 CE (Julian)−1
Gregorian1 January 1 CE (Gregorian)1
Armenian11 July 552 CE (Julian)201,443
French Republican22 September 1792654,415
Modified Julian Day 017 November 1858678,576
Unix epoch1 January 1970719,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.

Converting between Rata Die and other counts
CountFormula
Julian Day Number (noon)JDN = RD + 1,721,425
Julian Day at midnightJD = RD + 1,721,424.5
Modified Julian DayMJD = RD − 678,576
Days since the Unix epochRD − 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