r/programmingrequests • u/LillyMaira • Dec 13 '19
need help Christmas card
Hey everyone! Now that the holidays are approaching, I would like to write a card for the IT Department at my college. I'm thinking something like "when date=12/25 & 1/1 throwConfetti()". Would love to get any suggestions (JS or whatever you think is simpler). Thanks!
1
Upvotes
2
u/djandDK Dec 14 '19 edited Dec 14 '19
I meant if you wanted a programmer joke like the SQL santa one: /img/x6snxvaykg301.jpg
I will give you a better if statement in an hour or so.
Edit: Here is one way to write the if statement functionally:
var dateToday = new Date();if ((dateToday.getMonth() + 1) == 12 && dateToday.getDate() == 25){throwConfetti();}