@strong-roots-capital/first-full-week-of-year
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

first-full-week-of-year Build status npm version codecov

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
firstFullWeekOfYear :: Date -> Date

Creates a Date object representing the first Monday of the specified year.

Acknowledgments

Readme

Keywords

Package Sidebar

Install

npm i @strong-roots-capital/first-full-week-of-year

Weekly Downloads

1

Version

2.0.1

License

ISC

Unpacked Size

5.33 kB

Total Files

4

Last publish

Collaborators

  • amchelle
  • hamroctopus