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

strong-roots-capital/subtract-timeframe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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