Code:
var d = new Date(),
month = d.getMonth(),
day = d.getDate(),
year = d.getFullYear(),
humanMonth = [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
][month];
var holidays = {
'1/1' : ["New Year's Day", "Happy " + year],
'1/15' : ["Martin Luther King's Birthday", "Feel the freedom"],
'1/27' : ["The Penguin Popcorn Parade", "Munch, munch, munch"], // What the heck? Haha.
'2/2' : ["Groundhog Day", "Let's hope he'll wake up"],
'2/12' : ["Abraham Lincoln's Birthday", "Goodbye, slavery"],
'2/14' : ["Valentine's Day", "Feel the love"],
'2/15' : ["Petentine's Day", "Slurp, slurp, slurp"], // Never heard of this one either...
'2/22' : ["George Washington's Birthday", "Fly the flag"],
'3/17' : ["Saint Patrick's Day", "It's hard to find <i>any</i> clovers"], // Not here :-)
'4/1' : ["April Fool's Day", "My computer is laughing"],
'4/10' : ["ASPCA's Birthday", "Woof, woof, woof"], // I'm guessing this is the equivalent of RSPCA?
'4/22' : ["Earth Day", "I think I use too many watts"],
'6/14' : ["Flag Day", "Someone design an Antarctica flag"],
'7/4' : ["Independence Day", "Fireworks scare me"],
'8/29' : ["Henry Bergh's Birthday", "1813? Yikes"],
'10/31' : ["Hallowe'en", "Whooooooo"],
'12/25' : ["Christmas", "Smell the gingerbread"],
'12/31' : ["New Year's Eve", "Goodbye, " + year]
};
var holiday = holidays[(month + 1) + "/" + day] || [humanMonth + " " + day, ""];
document.write("It's " + holiday[0] + "!<br><center><font class=exclamation>" + holiday[1] + "!</font></center></br>");
It was quite entertaining, I've never even heard of some of these American holidays... what exactly happens on the Penguin Popcorn Parade? And what on earth is Petentine's Day? o.@
Bookmarks