0.1.3 • Published 7 years ago

get-nearest-day-of-week v0.1.3

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

get-nearest-day-of-week npm

Build Status Code Climate Test Coverage downloads license

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