You are not logged in.
Pages: 1
/*
get_weekday(day,month,year)
arguments:
day
month
year
returns:
the weekday on the date indicated
0=sunday
1=monday
2=tuesday
*/
yy=argument2 mod 100
c=((argument2-(argument2 mod 100))/100)
m= argument1+10
if m>12 =false {yy-=1}else{m-=12}
return (floor(argument0+((13*m-1)/5))+yy+floor(yy/4)+floor(c/4)-(2*c))mod 7
made this while checking zeller's laws
Offline
Interesting but Game Maker already has this functionality.
date_get_weekday(date_create_date(year,month,day));
What are "zeller's laws"?
Abusing forum power since 1986.
Offline
Woops I completely missed that one. I honestly don't even remember that command.
and for zeller's laws
http://en.wikipedia.org/wiki/Zeller's_congruence
the 'laws' are the rules you have to follow to find the correct weekday.
Last edited by blopit (2009-05-20 18:03:32)
Offline
Pages: 1