Skip to content

Instantly share code, notes, and snippets.

@iahu
Created Jun 28, 2020
Embed
What would you like to do?
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