Calendar Calculations (1 Viewer)

sznsx

Registered User.
Local time
Today, 07:18
Joined
Jul 25, 2004
Messages
20
Hey random question guys...

Whats the algorithm for determing the first day of a given year?

Example:

Sun 0, Mon 1, Tues 2, Wed 3, Thurs 4, Fri 5, Sat 6

f(2004) = 4 = Which is Thursday

January 1st, 2004, was a Thursday.

THANKS!
 

Chatbox

Registered User.
Local time
Today, 07:18
Joined
Aug 30, 2004
Messages
68
Why do you need the algorithm when there's already a function for it?
 

sznsx

Registered User.
Local time
Today, 07:18
Joined
Jul 25, 2004
Messages
20
reply

Because I'd like to know how it works for another project, just thought I'd ask here if anyone knew..... I once knew it but without using it, I forgot it.
 

Users who are viewing this thread

Top Bottom