CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Guest

    to calculate holidays

    How can I calculate Easter, or other holidays


  2. #2
    Join Date
    May 1999
    Location
    Oregon, USA
    Posts
    302

    Re: to calculate holidays

    Easter is probably the most difficult of all since it is not a 'fixed' date.
    If I am not mistaken, the date it falls on is determined by the phases
    of the moon and I am not sure what the specific algorithm is. Many
    of the other holidays involve something like 'the second Monday of
    the month'. That is, in the US where we have this fondness for
    three-day weekends. Sorry I could not be more helpful but you have
    made me curious. Time to do some searching.

    Well, I found several algorithms. You should check them out and
    decide for yourself which to use. I found them by going to
    altavista and using this search phrase : Easter +algorithm.

  3. #3
    Join Date
    May 1999
    Posts
    8

    Re: to calculate holidays

    Use Gauss Easter Formula
    I was using that one in a previous job I had
    It works fine for the werstern calendar, but will not do the job for Orthodox churches in eastern Europe


  4. #4
    Join Date
    May 1999
    Posts
    388

    Re: to calculate holidays

    I you want to check a date and tell if is a holiday or not then I do this like:

    make a database table with listing of all holidays in certain period.
    if you want to check a date to holiday simply run an SQL matching the date. If it is found you know it is holiday!

    hope this helps!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured