answersLogoWhite

0

One way to determine the day of week based on the date is to use Zeller's congruence. For the Gregorian calendar...

int dayofweek (int month, int day, int year) {

int weekday;

if (month < 3) month += 12;

weekday = day;

weekday += int ((month + 1) * 26 / 10);

weekday += year;

weekday += int (year / 4);

weekday += 6 * int (year / 100);

weekday += int (year / 400);

weekday %= 7;

return weekday; /* 0 = Sunday, ..., 6 = Saturday */

}

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What is robust on java?

A robust program is a program that will accept junk input and not crash. Example: a program that accepts "pancakes" for a date input and pops up a error box or just uses a date input so that this does not happen is a robust program.


How does a 3-D CAD solid model program display the progression of work involved in creating a model?

If you input all of the correct numbers then the program will then analyze it and produce a 3-D graph of the date you've put it. You must keep accurate data over your work period to input into the program.


What is the code of C language program- input today date find tomorrow date?

#include


How would one use the Unix time and function for C date?

One would use the Unix time and date function for a date in the C programming language to display the date and time from an application. When a user types the name of a program and date function is called a display will shown on the screen.


What does dsp date mean?

Display date


Which PHP string is used to output a date in ISO 8601 format?

ISO 8601 is an international standard for displaying dates and times in order to communicate them across language barriers. On webpages where PHP coding is enabled, the string ' will display the date in ISO 8601 format.


What channel is fcw on direct tv?

You can perform a search to locate the channel that show is broadcast on either from your receiver or from our website at dishnetwork. On your receiver, just press the left arrow button on your remote to display the Themes and Search window. Go to Keyword, press select, then input the name of the event or program. Select Done, and then select Get Results. If the receiver finds any matches, it will display each channel, date, and time. From our website in the upper right hand corner is a link, Check TV Schedule; click on that link. On the next page, select your programming package and input your zip code. Select Submit. Input the event or title on the next page and select Search. If there are any matches, it will be display in a list.


What is the DOS command for weekday and time?

In DOS, you can use the date command to display or set the current date, and the time command to display or set the current time. To see the current date and time along with the weekday, you can use the echo command combined with the %date% and %time% environment variables. For example, you can enter echo %date% %time% to display the current date and time.


Is Google Adsense profitable in Indonesia?

As of November 2009, Google Adsense has yet to offer its program to Indonesian sites. To date, sites in Bahasa Indonesia will not be able to display any adsense ads.


Why does your phone display the wrong date?

You can change the date on your phone just read the directions.


What is the DSP Date and JStAt in jail mean?

display date


What command displays the time on most Linux and Unix computer?

The time command is used to time a command and not display the actual time. To display the time and date, the date command must be used.