Created
June 28, 2020 15:02
-
-
Save iahu/2f2373f906db63791116262febe1c8cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mondayFirstWeekDay = day => (day + 7) % 8 | |
const isWeekend = date => !!Math.floor(mondayFirstWeekDay(date.getDay()) / 6) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment