On Fri, 21 May 2004, Ordak D. Coward wrote:

> I was looking at Omid K. Rad's implementation of calendar, and have a 
> few comments on calculating leap years.

Thank you ODC for evaluating my code.

> 1. The implemented algorithm uses a 128 year period, although the 
> comments say it uses a 2820 year period. While I need to ask for this 
> discrepancy be resolved, it is important to understand that the 128 
> year period and the 2820 year period only differ once every 2820 
> years. In other words, the current implementation does not differ from

> the 2820 year method until year 3294 A.P (or H.S.). [...]

Ofcouse, when I wrote that calendar, I was not sure about a formula that
I can rely on for 2820-year cycles:
21 x (29 + 33 + 33 + 33) + (29 + 33 + 33 + 37)
Once I tried to implement it using iterations to compare the results,
but it was a huge failure in performance as expected. If I give any
future releases I'll change the formula for sure, but let's first agree
on the method to calculate leap years. From a developer's point of view,
I don't see me qualified enough to choose a cerain algorithm now.

Thanks again for commenting.

Omid


P.S: For those who want to see the code, you can download it from here:
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=8
44E1A97-0E12-48D7-B2F9-D5884A9B1523
This is the code that was proposed to Microsoft two years ago.

_______________________________________________
PersianComputing mailing list
[EMAIL PROTECTED]
http://lists.sharif.edu/mailman/listinfo/persiancomputing

Reply via email to