Hobbies And Interests
Home  >> Science & Nature >> Science

How to Derive the Day of the Year From a Date

Calculating the day of the week that a particular date of a year occurred on requires a rather lengthy formula that must account for factors such as leap years. Numerous online calculators exist to help you check your work once you come to a final answer. Note that this formula only works for the Gregorian calendar.

Instructions

    • 1

      Find what day of the week a particular date of a particular year fell on using the following formula: d + 2m + (3(m + 1) / 5) + y + (y / 4) - (y / 100) + (y / 400) + 2, where "d" is the numerical day portion of the date, "m" is the month and "y" is the year. Solve the portions of the formula within the parenthesis, only, to the integer answer, disregarding any remainders. Divide the answer of the formula by 7 and use the remainder of the division to determine the day of the week, with 0 equal to Saturday, 1 to Sunday and so on.

    • 2

      Note that the month numbers of January and February should be 13 and 14 of the previous year to account for the presence of leap years. Remember that leap years add a day to the end of February, changing the number of days prior on the calendar, and thus affecting the total number of days through January and February. Write the "m" and "y" of January 3, 1995, as 13 and 1994 but the "m" and "y" of March, which comes after the leap day, as 3 and 1995. The from March to December also revert to their normal numerical representation.

    • 3

      Find the day of the week for January 9, 1988. Note that because the month is January, the "m" will equal 13 and the year "1987" to account for potential leap years. Enter the known information into the formula: 9 + 2(13) + (3(13 + 1) / 5) + 1987 + (1987 / 4) - (1987 / 100) + (1987 / 400) + 2. Simplify the portions in the parentheses, keeping only the integer portion of the answer: (3(31 + 1) / 5) = 8.4 or 8; (1987 / 4) = 496.75 or 496; (1987 / 100) = 19.87 or 19; and (1987 / 400) = 4.9675 or 4.

    • 4

      Rewrite the formula with the simplified information: 9 + 26 + 8 + 1987 + 496 - 19 + 4 + 2 = 2,513. Divide the answer by 7: 2,513 / 7 = 359.0. Note that because the remainder is 0, and a remainder of 0 corresponds to Saturday, then January 9, 1988, was a Saturday.


https://www.htfbw.com © Hobbies And Interests