|
Posted by Jerry Stuckle on 02/16/06 18:00
rjfjohnson@hotmail.com wrote:
> NC,
>
> I tried that function - it works rather well except, it doesnt seem to
> take into account leap years.
>
> Who in their right mind would invent a leap year!!!???
>
> Any suggestions to jump over this hurdle?
>
> Ryan
>
Ryan,
I'm confused. NC's code works fine. Extrapolating it for several years
(and formatting to get the day of the week), I get:
Today is Thursday, February 16, 2006
1 years ago was Thursday, February 17, 2005
2 years ago was Thursday, February 19, 2004
3 years ago was Thursday, February 20, 2003
4 years ago was Thursday, February 21, 2002
5 years ago was Thursday, February 22, 2001
6 years ago was Thursday, February 24, 2000
7 years ago was Thursday, February 25, 1999
8 years ago was Thursday, February 26, 1998
9 years ago was Thursday, February 27, 1997
10 years ago was Thursday, February 29, 1996
This is fine for the last few years, but eventually (when you get seven
extra days, Year 2000 in this example) it's off a week.
But for the last 3-4 years it should be fine.
What is different about what you're looking for?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|