Ordinal date

Ordinal date

An ordinal date is a calendar date typically consisting of a year and a day of year ranging between 1 and 366 (starting on January 1), though year may sometimes be omitted. The two numbers can be formatted as YYYY-DDD to comply with the ISO 8601 ordinal date format.

Contents

Calculation

Computation of the ordinal date within a year is part of calculating the ordinal date throughout the years from a reference date, such as the Julian date. It is also part of calculating the day of the week, though for this purpose modulo-7 simplifications can be made.

For these purposes it is convenient to count January and February as month 13 and 14 of the previous year, for two reasons: the shortness of February and its variable length. In that case the date counted from 1 March is given by

floor ( 30.6 ( m + 1 ) ) + d − 122

which can also be written

floor (30.6 m − 91.4 ) + d

with m the month number and d the date.

The formula reflects the fact that any five consecutive months in the range March–January have a total length of 153 days, due to a fixed pattern 31–30–31–30–31 repeating itself some more than twice.

"Doomsday" properties:

For m = 2n and d=m we get

floor (63.2 n − 91.4 )

giving consecutive differences of 63 (9 weeks) for n = 2, 3, 4, 5, and 6, i.e., between 4/4, 6/6, 8/8, 10/10, and 12/12.

For m = 2n + 1 and d=m + 4 we get

floor (63.2 n − 56.8 )

and with m and d interchanged

floor (63.2 n − 56.8 + 118.4 )

giving a difference of 119 (17 weeks) for n = 2 (difference between 5/9 and 9/5), and also for n = 3 (difference between 7/11 and 11/7).

The ordinal date from 1 January is:

  • for January: d
  • for February: d + 31
  • for the other months: the ordinal date from 1 March plus 59, or 60 in a leap year

or equivalently, the ordinal date from 1 March of the previous year (for which the formula above can be used) minus 306.

Modulo 7

Again counting January and February as month 13 and 14 of the previous year, the date counted from 1 March is modulo 7 equal to

floor (2.6 m − 0.4 ) + d

with m the month number and d the date.

This is the weekday relative to "Doomsday."

Table

To the day of Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
Add 0 31 59 90 120 151 181 212 243 273 304 334
Leap years 0 31 60 91 121 152 182 213 244 274 305 335

For example, the ordinal date of April 15 is 90 + 15 = 105 in a common year, and 91 + 15 = 106 in a leap year.

References and external links

See also


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • Ordinal — may refer to: Ordinal number (linguistics), a word representing the rank of a number Ordinal scale, ranking things that are not necessarily numbers Ordinal indicator, the sign adjacent to a numeral denoting that it is an ordinal number Ordinal… …   Wikipedia

  • Date and time notation in Poland — Date In Poland the first system for denoting abbreviated dates used roman numerals for months (e.g., 11 XI 1918 for Independence Day). The current year can be replaced by the abbreviation br. and the current month can similarly be replaced by the …   Wikipedia

  • Date and time notation in Brazil — Date In Brazil, dates follow the day month year order, using a slash as the separator. Example: 20/06/2008 or 20/06/08. Leading zeros may be omitted, specially on month, but never on the year field: 9/5/08. In formal writing, months are spelled… …   Wikipedia

  • Date and time notation in Hungary — Date In Hungary date is traditionally expressed in big endian form, like ISO 8601. Numeric date elements are followed by a dot. The format yyyy. month d. is commonly used, the name of the month can be abbreviated (standard are ‘jan.’, ‘febr.’,… …   Wikipedia

  • Date and time notation in Serbia — Date Serbian language uses either all numeric form of dates in the little endian date month year order, or the same order in which numerical month is replaced with its literal name. The dot is used as a separator, followed by space, and matches… …   Wikipedia

  • Date and time notation in the United States — Date In the United States, dates are traditionally written in the month day year order, that is, in neither descending nor ascending order of significance. (In computing, this would be called a middle endian order.) This order is used in both the …   Wikipedia

  • Date and time notation in Finland — Date In Finland the usual way of writing dates in normal text is with the months spelled out.[1][2] The format varies according to the language used. In Finnish a period is placed after the day to indicate an ordinal: “31. toukokuuta 2002”;… …   Wikipedia

  • Date and time notation in Sweden — Date In Sweden, the ISO 8601 standard is closely followed in most written Swedish[citation needed]. Dates are generally and officially[citation needed] written for example 2006 12 31 , but the older forms 31/12 2006 or 31/12 06 are frequently… …   Wikipedia

  • Date and time notation by country — Different style conventions and habits exist around the world for dates and times in writing and speaking. Examples:*The order that a year, month, and day are written. *How weeks are identified. *The 24 hour clock and/or the 12 hour clock. *The… …   Wikipedia

  • Date and time notation in Europe — See also: Date and time representation by country The European Committee for Standardization (CEN) adopted ISO 8601 with EN 28601. CEN member states are required to adopt the standard too. Except for Austria, Germany and Switzerland, see the… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”