@strong-roots-capital/first-full-week-of-year
v2.0.1
Published
Find the first week of a given year composed entirely of days in said year
Downloads
9
Readme
first-full-week-of-year
Find the first week of a given year composed entirely of days in said year
Note: this package assumes Monday to be the first day of the week.
Install
npm install @strong-roots-capital/first-full-week-of-year
Use
import firstFullWeekOfYear from '@strong-roots-capital/first-full-week-of-year'
console.log(firstFullWeekOfYear(new Date("2019-05-25T00:00:00.000Z")))
//=> 2019-01-07T00:00:00.000Z
Documentation
firstFullWeekOfYear :: Date -> Date
Creates a Date object representing the first Monday of the specified year.