Date searching
08-Jul-94 06:28:56
Sb: #41694-Date searching
Fm: Gerald Bonnstetter 71172,3141
To: Henry Williams 73527,1446
Hello Henry,
Your algorythm looks good on the first pass but it is wrong. It looks
like you tried putting too much into the two if's. You will probably need
several if's.
To find your problems you can step through your code using different dates
and you will see what part needs to be changed. Try these dates to start,
from.day = 15 from.month = 10 from.year = 1960
to.day = 4 to.month = 5 to.year = 1990
then try an actual date of
day = 6 month = 3 year = 1970
and it will fail due to the month if I'm reading your code right. And in
this case the month and day do not matter because the year is between the
to and from year and not equal to either.
If the actual year was equal to 1960 or 1990 then you would need to do a
test of the month, but a different test depending on which year was equal.
And maybe a another test if all three years are equal.
Is this enough to get you going or do you need more help? I could say
more but it might be best if you worked it out yourself. Looking for and
finding all the possibilities part of programming.
//
\X/ Amiga or bust! Gary Bonnstetter, Bonnsoft