**Are you an EPFL student looking for a semester project?**

Work with us on data science and visualisation projects, and deploy your project as an app on top of Graph Search.

Concept# Determination of the day of the week

Summary

The determination of the day of the week for any date may be performed with a variety of algorithms. In addition, perpetual calendars require no calculation by the user, and are essentially lookup tables.
A typical application is to calculate the day of the week on which someone was born or a specific event occurred.
In numerical calculation, the days of the week are represented as weekday numbers. If Monday is the first day of the week, the days may be coded 1 to 7, for Monday through Sunday, as is practiced in ISO 8601. The day designated with 7 may also be counted as 0, by applying the arithmetic modulo 7, which calculates the remainder of a number after division by 7. Thus, the number 7 is treated as 0, the number 8 as 1, the number 9 as 2, the number 18 as 4, and so on. If Sunday is counted as day 1, then 7 days later (i.e.day 8) is also a Sunday, and day 18 is the same as day 4, which is a Wednesday since this falls three days after Sunday (i.e.18 mod 7 = 4).
The basic approach of nearly all of the methods to calculate the day of the week begins by starting from an 'anchor date': a known pair (such as 1 January 1800 as a Wednesday), determining the number of days between the known day and the day that you are trying to determine, and using arithmetic modulo 7 to find a new numerical day of the week.
One standard approach is to look up (or calculate, using a known rule) the value of the first day of the week of a given century, look up (or calculate, using a method of congruence) an adjustment for the month, calculate the number of leap years since the start of the century, and then add these together along with the number of years since the start of the century, and the day number of the month. Eventually, one ends up with a day-count to which one applies modulo 7 to determine the day of the week of the date.
Some methods do all the additions first and then cast out sevens, whereas others cast them out at each step, as in Lewis Carroll's method.

This page is automatically generated and may contain information that is not correct, complete, up-to-date, or relevant to your search query. The same applies to every other page on this website. Please make sure to verify the information with EPFL's official sources.

Related concepts (3)

Related publications (4)

Related courses (33)

Gregorian calendar

The Gregorian calendar is the calendar used in most parts of the world. It went into effect in October 1582 following the papal bull Inter gravissimas issued by Pope Gregory XIII, which introduced it as a modification of, and replacement for, the Julian calendar. The principal change was to space leap years differently so as to make the average calendar year 365.2425 days long, more closely approximating the 365.2422-day 'tropical' or 'solar' year that is determined by the Earth's revolution around the Sun.

Week

A week is a unit of time equal to seven days. It is the standard time period used for short cycles of days in most parts of the world. The days are often used to indicate common work days and rest days, as well as days of worship. Weeks are often mapped against yearly calendars, but are typically not the basis for them, as weeks are not based on astronomy. The modern seven-day week can be traced back to the Babylonians, who used it within their calendar.

Julian day

The Julian day is the continuous count of days since the beginning of the Julian period, and is used primarily by astronomers, and in software for easily calculating elapsed days between two events (e.g. food production date and sell by date). The Julian period is a chronological interval of 7980 years; year 1 of the Julian Period was 4713 BC (−4712). The Julian calendar year is year of the current Julian Period. The next Julian Period begins in the year AD 3268.

CS-423: Distributed information systems

This course introduces the foundations of information retrieval, data mining and knowledge bases, which constitute the foundations of today's Web-based distributed information systems.

FIN-406: Macrofinance

This course provides students with a working knowledge of macroeconomic models that explicitly incorporate financial markets. The goal is to develop a broad and analytical framework for analyzing the

CH-222: Coordination chemistry

Fundamental knowledge of coordination compounds.

Related lectures (195)

Quantum Bits: Illustrations and Postulates

Explores quantum bits, including illustrations, postulates, and examples of quantum systems and Hilbert space.

Illustration of Quantum Bits

Covers the postulates of Quantum Mechanics and examples with quantum bits, including observables and unitary matrices.

Crystal Field Theory: Spectrochemical Series

Explores the Spectrochemical Series for metals and ligands, Crystal Field Splitting, Jahn-Teller distortion, and bonding interactions in coordination compounds.

Kamiar Aminian, Anisoara Ionescu, Lena Carcreff, Stéphane Armand

The purpose of this pilot study was to compare walking speed, an important component of gait, in the laboratory and daily life, in young individuals with cerebral palsy (CP) and with typical development (TD), and to quantify to what extent gait observed in ...

Background: The Lifestyle-integrated Functional Exercise (LiFE) program is an intervention integrating balance and strength activities into daily life, effective at reducing falls in at-risk people >= 70 years. There is potential for LiFE to be adapted to ...

Hubert van den Bergh, Georges Wagnières, Matthieu Zellweger, Carla Martoccia

Fluorescence cystoscopy (FC) efficiently enhances the detection and improves the therapeutic management of early bladder cancer. During an FC, about 150 ml of water is needed to inflate the bladder. The water is quickly diluted by urine which can be fluore ...