Use Date.prototype.getDay() to check weekend by using a modulo operator (%).
Time & Date
Here’s a trick for getting back a formatted month name (like January or Jan).
Here’s a way to get the date for the next occurrence of a specific day of the week.
Use the greater than operator (>) to check if the first date comes after the second one.
Use the less than operator (<) to check if the first date comes before the second one.
Use the greater than (>) and less than (<) operators to check if date is between dateStart and dateEnd.
Here is a vanilla JS alternative to the moment.js timeFromNow() method.
Set an alarm that will play any sound from your computer. You can even select a snooze time after it sounds. Awesome!
This script displays a calendar page of the chosen month and year. The function takes a date object as its parameter. If it is omitted, the calendar will default to the date on the client computer.