123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|719|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> Possible error?

Mon, 25 Feb 2008, 10:55
dna


I'm using this equation:

d=(01+y+(y/4)-(y/100)+(y/400)+((31*m)/12))Mod 7:x2=(d+curday-1) Mod 7:y2=Int((d+curday-1)/7)

for calculating the dates. When a leap year comes, it does not add the 29th day of February.

Is this an internal Blitz math error or, should the equation be adjusted.


Thanks


-=-=-
DNA
Mon, 25 Feb 2008, 11:09
Phoenix
Are we supposed to be able to understand that code? Split it up into multiple lines to make it more readable. And please try to explain what the different parts of the equation are supposed to do.

What value does curday have? Is it a string containing the current day's name? What are the other variables?
Mon, 25 Feb 2008, 12:11
rockford
I'm not entirely sure what you are trying to do, but is this similar to what you are wanting?

https://www.daviddarling.info/encyclopedia/Z/Zellers_formula.html
Mon, 25 Feb 2008, 15:24
dna
Yes, that is the formula that I am using, or a variation of it.

I stand corrected. That is NOT the formula that I am using.
It's not related at all except for the result it is supposed to provide.

-=-=-
DNA