Skip to content
This repository has been archived by the owner on Dec 30, 2023. It is now read-only.

Latest commit

 

History

History
33 lines (22 loc) · 1.29 KB

readme.md

File metadata and controls

33 lines (22 loc) · 1.29 KB

is-latest-closed-session Build status npm version codecov

Test to determine if a date falls inside the most-recently closed session

Install

npm install @strong-roots-capital/is-latest-closed-session

Use

import isLatestClosedSession from '@strong-roots-capital/is-latest-closed-session'

isLatestClosedSession(new Date(0), '4H')
//=> false

isLatestClosedSession(new Date(0), '1', new Date(61 * 1000))
//=> true

isLatestClosedSession(new Date(0), 240)
//=>false

isLatestClosedSession(1571871598069, '1')
//=> true

Related