Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

strong-roots-capital/add-timeframe

Repository files navigation

add-timeframe Build status npm version codecov

Increment date by timeframe

Install

npm install @strong-roots-capital/add-timeframe

Use

import { addTimeframe } from '@strong-roots-capital/add-timeframe'

const date = new Date()

console.log(date)
//=>2019-04-14T23:57:54.654Z

console.log(addTimeframe('4H', date))
//=>2019-04-15T03:57:54.654Z

Related