Half-birthday

For several years I’ve been running a simple half-birthday calculator. Every once in a while I’ll discover that it’s been noticed by a new group of people; the first, I think, was the Degrassi fan forum, and the most prominent by far is the Macmillan Dictionary’s Word of the Week. Until today, though, no one’s ever tracked me down to comment on it.

And that comment raises a valid point. I explain on the calculator page that, unlike some sites, I add half a year, i.e. 182.5 days. (The others just add six months, which means that some people wouldn’t have half-birthdays, notably those with a birthday in late August.) It’s this statement to which Scott replied:

Wouldn’t that mean you’d need an input field for *time* of birth? That half a day you add would therefore change the answer.

He’s exactly right… and now comes the time to ‘fess up to my dirty little secret: I’ve never actually added 182.5 days. Instead, I’ve always added 183. (Some math geek I am, eh?)

Well, no longer. Thanks to Date::Calc the calculator is now (almost) completely legit. I had to make a judgement call on leap years, so if you were born on or after March 1 in the year before a leap year or on or before February 29 of the leap year, you’ll still get 183 days added. A nice side effect of the new math is that if you were born on August 30 of the year before a leap year you’re one of the few who can claim February 29 as your half-birthday; this wasn’t possible before. (If you were born on or near a leap-second, tough — do your own math!)

We now return you to your regularly scheduled (half-)lives. 🙂

Published by