My weekend project: When's your next "fun" birthday?

Posted by Luke Francl
on Monday, March 01

When’s the next time your birthday is going to be on a Friday or Saturday, so you can go out and have fun?

That’s what my little weekend project will tell you.

This site came about because my wife and I figured out that the next time her birthday falls on a Friday, she’ll be 42 years old! Yikes.

This was a fun site to build because I got to play with some JavaScript libraries that I don’t often use, like date.js, mustache.js, and TypeWatch. I also made use of some cool CSS 3 features like @font-face with the font Tuffy Bold from Kernest. For the CSS, I used 1KB CSS Grid based on Geoffrey Grossenbach’s suggestion.

Comments

Leave a response

  1. Noah HendrixMarch 01, 2010 @ 01:13 PM

    One small bug I found is that I entered my birthday (02/12/1990), which happened already and it says: “Your birthday will be on a Friday in 2010. You will be 20 years old. Find a kegger.” Of course that is not my “next” birthday it was my last. Another funny bit is that it says I’ll be 20 years old and to “Find a kegger,” maybe that should be saved for when I am 21? :) Really cool design and a great weekend project!

  2. Luke FranclMarch 01, 2010 @ 01:29 PM

    Thanks for the bug report, I will take a look.

    It recommends you “find a kegger” because (Americans anyway) can’t go out to a bar when they’re 20. ;)

  3. AndreMarch 01, 2010 @ 04:11 PM

    Hiya, maybe your interface should be more specific about the expected date format, you know, for international users.

    Cheers, Andre

  4. SeanMarch 01, 2010 @ 04:46 PM

    You could also try http://chronic.rubyforge.org/ to allow for (more) general date inputs.

  5. Luke FranclMarch 01, 2010 @ 05:41 PM

    Noah, the problem you reported should be fixed now.

    Andre, good idea. Date.js is pretty flexible so most formats “just work” but it is set to use American-style dates when it’s ambiguous. I could probably sniff the user’s locale and have it use the date format they prefer. Or I could just label the form.

    Check out the date.js home page for some examples of how flexible it is.

  6. Aditech DevelopmentMarch 04, 2010 @ 02:50 AM

    Thanks for such useful report. I always like your articles and regularly read them.

  7. Kurt WerleMarch 05, 2010 @ 01:09 PM

    2/29/1980 -> Your birthday will be on a Friday in 2014. You will be 34 years old.

    There is no 2/29/2014

  8. Luke FranclMarch 05, 2010 @ 05:46 PM

    Consider leap day birthdays a “known issue”. I’m not sure how to fix it—when do people born on leap days celebrate their birthdays? February 28? March 1?

  9. Kurt WerleMarch 05, 2010 @ 06:48 PM

    It is my very limited experience that they celebrate it on 2/29.

    No, I’m not a leap day baby.