[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: day of the week
- Subject: Re: day of the week
- From: "Wanko, Christopher G, CFCTR" <apollo@ATT.COM>
- Date: Thu, 22 Oct 1998 11:21:10 -0400
> If you can get the Julian date of the special date, you can use the
> following formula:
<formula snipped>
Thanks for the formula, this goes into the hopper!
> As for the week of the year, you will need to determine what
> day of the year
> it is from (1 to 365/366) and divide by 7.
Really? January 1st falling on a Friday means trouble for this algorithm:
the 3rd of January is in the second week.
You might try combining what you know about Julian dates (like the nifty
formula above) to get what DOW the 1st of January is... that will help
supply a constant to let you adjust what "week" your day is in after using
the "divide by 7" rule.
<Notice I don't actually solve the homework problem, folks.>
-Chris