1.0.0 • Published 5 years ago

@strong-roots-capital/subtract-timeframe v1.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

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