get-nearest-day-of-week
v0.1.3
Published
the function to get nearest day of week.
Downloads
54
Maintainers
Readme
get-nearest-day-of-week
The function return the date to get nearest day of week.
getNearestDayOfWeek(aDate, aDayOfWeek)
- parameters:
- aDate (Date|String): the date to search the nearest day.
- aDayOfWeek(Integer|Array): the nearest day of week(s).
- 1-7: Monday...Sunday
Usage
var getNearestDayOfWeek = require('get-nearest-day-of-week')
//1-7: Monday...Sunday
getNearestDayOfWeek('2016-9-21', 7)
//=2016-9-18
License
MIT