danieldaniel_2000
asked on
for nieto
can u explain the code u post for the calendar?
how that equation works?
can u explain the number u used?
how that equation works?
can u explain the number u used?
ASKER
here it is:
can u tell me how u get those number for the equation?
From: nietod
Date: Monday, February 08 1999 - 04:10PM PST
For example,
// The date in dd/mm/yyyy.
int dd=1;
int mm=1;
int yy=1900;
int jdn;
char *weekday[]={"Tuesday",
"Wednesday",
"THursday",
"Friday",
"Saturday",
"Sunday",
"Monday"};
if (mm < 3)
{
mm += 12;
yy -= 1;
}
jdn = dd+1720996+(mm+1)*306/10+y y*365 + yy/4 - yy/100 + yy/400;
printf("%s\n",weeday[jdn%7 ]);
can u tell me how u get those number for the equation?
From: nietod
Date: Monday, February 08 1999 - 04:10PM PST
For example,
// The date in dd/mm/yyyy.
int dd=1;
int mm=1;
int yy=1900;
int jdn;
char *weekday[]={"Tuesday",
"Wednesday",
"THursday",
"Friday",
"Saturday",
"Sunday",
"Monday"};
if (mm < 3)
{
mm += 12;
yy -= 1;
}
jdn = dd+1720996+(mm+1)*306/10+y
printf("%s\n",weeday[jdn%7
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If so, I'm not sure what it refers to.