Skip to content

Instantly share code, notes, and snippets.

@yyx990803
Last active December 23, 2015 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yyx990803/6552708 to your computer and use it in GitHub Desktop.
Save yyx990803/6552708 to your computer and use it in GitHub Desktop.
var now = new Date(),
year = now.getYear() + 1900,
first = new Date(year, 0, 0),
elapsedMs = now.getTime() - first.getTime(),
elapsedDays = ~~(elapsedMs / (1000 * 60 * 60 * 24))
if (elapsedDays === Math.pow(2, 8)) {
console.log("Yes. Happy Programmers' Day!")
} else {
console.log("No. Get back to work.")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment