dave seah: better living through new media Filter Navigation Design Portfolio The Printable CEO Series The Printable CEO Series Compact Calendar Compact Calendar Back to Home Page Admin:Login

Compact Calendar Change for Reported Easter Calculation Bugs

POSTED 01/17/2010 UNDER ThinkingTools

This year's Compact Calendar added "automatic holiday calculation" when the year is changed in the Excel spreadsheet. Holiday calculations are terribly tricky, though, and a bug in the Easter Calculation was reported by Mike Kennedy with OpenOffice. The Easter calculation I'm using, he pointed out, assume date entry in a certain text format which is not universal. I went back and looked at it and saw he was right, though I couldn't duplicate the other reported bug. Anyway, I've uploaded a more robustly-coded version of original Easter calculation, which substitutes the locale-specific date string with the Excel DATE function.

UPDATE: After downloading OpenOffice and cross-checking the calculation with Google Spreadsheet, it appears that the cause of the bug is due to a difference between in how the DAY() function works for values under 61. So if you are using Excel you are fine, but OpenOffice users should probably use the EASTERSUNDAY() function.

UPDATE2: Here's an explanation of why Excel's DAY() function is buggy; it was originally to maintain compatibility with Lotus 1-2-3, which used to be the dominant spreadsheet.

In Excel 2007, Easter appears to be calculated correctly for the next five years. If you are outside the USA, you can re-download the ZIP file from the Compact Calendar Page for the more robust version of the calculation.


Comments

BBCode is supported for text formatting. Example: [b]bold[/b], [url=http://davidseah.com]my link[/url].
I will delete blog spam on sight.

Name: if not a personal name, comment will be deleted

Email:

Location:

URL: If looks like spam, comment will be deleted

Remember my personal information

Notify me of follow-up comments?

Submit the word you see below:


<< Back to main

Thank you for printing this article! Please note that all material on this website is copyrighted by either David Seah or individual comment contributors. To request permission for republication and distribution, please contact David Seah (http://davidseah.com/contact).