Update isWeekday.md
This commit is contained in:
committed by
GitHub
parent
116ef9a34e
commit
fab7b21183
@ -9,9 +9,7 @@ Results in a boolean representation of a specific date.
|
||||
- Use `Date.getDay()` to check weekday by using a modulo operator and then returning a boolean.
|
||||
|
||||
```js
|
||||
const isWeekday = (t = new Date()) => {
|
||||
return t.getDay() % 6 !== 0;
|
||||
};
|
||||
const isWeekday = (t = new Date()) => t.getDay() % 6 !== 0;
|
||||
```
|
||||
|
||||
```js
|
||||
|
||||
Reference in New Issue
Block a user