Wondering what’s next for npm?Check out our public roadmap! »

    @strong-roots-capital/subtract-timeframe
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.0 • Public • Published

    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

    Install

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

    DownloadsWeekly Downloads

    1

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    5.73 kB

    Total Files

    4

    Last publish

    Collaborators

    • avatar
    • avatar