Happy leap day
Author: Cosimo
29
Jan
Today, some people reported to us that their blog posts where not showing in their calendar. A bit odd of course, except the entire day was missing from the February month. We quickly dropped everything and went right to it. No way, we were going to pretend today never existed.
The fix was twofold, one fix in our frontend code that did its own month representation calculation, and one on the backend which had stuff like
if year % 4 && ! year % 100 && year % 400 in it. The solution was to move the calculation to one place, namely a standard third party library available for years and thorougly tested.
This means My Opera now is leap year compliant (at least in the calendar module)! Of course, if you read this tomorrow, (that would be today for you, but then this article is from yesterday), you will only have to wait 4 years till next time. Oh, and if you fire up your time machine and travel to year 1 BC, it won’t show up either. (Which reminds me we have to add a bug report about this feature might be stopping working in 2038).
Have a nice leap day!
Leave a reply
You must be logged in to post a comment.