Skip to content

Instantly share code, notes, and snippets.

@BinRoot
Created February 22, 2014 14:33
Show Gist options
  • Save BinRoot/9155718 to your computer and use it in GitHub Desktop.
Save BinRoot/9155718 to your computer and use it in GitHub Desktop.
<html>
<body>
<script>
var d = new Date()
var date = d.getDate()
if ( date > 20 ) {
alert("the month is almost over")
}
else if ( date > 10 ) {
alert("we're in the middle of the month")
}
else {
alert("the month just started")
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment