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

strong-roots-capital/next-session-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

next-session-generator Build status npm version codecov

Generator providing start of next session

Install

npm install @strong-roots-capital/next-session-generator

Use

import nextSessionGenerator from '@strong-roots-capital/next-session-generator'

console.log(new Date().toISOString())
//=>2019-04-26T01:28:35.727Z

const nextSession = nextSessionGenerator('1H', new Date())

console.log(nextSession.next().value)
//=>2019-04-26T02:00:00.000Z

console.log(nextSession.next().value)
//=>2019-04-26T03:00:00.000Z

console.log(nextSession.next().value)
//=>2019-04-26T04:00:00.000Z

Related

Acknowledgments