World Library  
Flag as Inappropriate
Email this Article

Ordinal date

Article Id: WHEBN0005463983
Reproduction Date:

Title: Ordinal date  
Author: World Heritage Encyclopedia
Language: English
Subject: Julian day, Ordinal date, Ordinal date/doc, ISO 8601, Year 2000 problem
Collection:
Publisher: World Heritage Encyclopedia
Publication
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 1
    • Modulo 7 1.1
  • Table 2
  • References and external links 3
  • See also 4

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.

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

  • Abstract for article on standard "Representation for Calendar Date and Ordinal Date for Information Interchange", Federal Information Processing Standards Publication 4-1, 1988 January 27, National Institute of Standards and Technology

See also

This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 


Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.