Day in week and week in year calculations, oops! 
Author Message
 Day in week and week in year calculations, oops!

Caution to those who copied my calendar routines some time ago:

As mentioned I converted those routines from IBM mainframe assembly and had no
time for testing at the time, now I have found a couple of errors which
sneaked in:

In the routine Jan4th there is an expression in the last line containing:  
(z+25) mod 28  -  this should instead read:  (z+8) mod 28

In the routine WeekOfYear the line initially calculating the week number ends
 with:  mod 7  - this should (of course) be:  div 7.

Also as some friends pointed out early there was an error in the routine
DayOfYear: The test on leap year corrections should include a test for month
number greater than 2, not greater than or equal to 2.

I hope those errors have not caused problems and apologize if they have.

After my summer holiday, in a few weeks time I plan to make available the
corrected source code both in Pascal language and as OPAL Paradox methods, I
believe they can be quite useful routines.

regards Sven

Wed, 18 Jun 1902 08:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Week calculation

2. Procedure to calculate Day of Week

3. Day Of Week function

4. WANTED: Procedure to calculate Day of Week

5. Week Of The Year

6. Week function needed

7. Weeks of searching - Turbo Access?


9. Week Number

10. Program for Week number

11. Learning Pascal in 8 weeks-help!

12. 500,- per week bijverdienen als programmeur


Powered by phpBB® Forum Software