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

Latest commit

 

History

History
29 lines (18 loc) · 1.02 KB

readme.md

File metadata and controls

29 lines (18 loc) · 1.02 KB

subtract-timeframe Build status npm version codecov

Decrement date by timeframe

Install

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

Use

import subtractTimeframe from '@strong-roots-capital/subtract-timeframe'

const date = new Date()

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

console.log(subtractTimeframe('4H', date))
//=>2019-04-14T23:57:54.654Z

Related