english-duration

1.0.1 • Public • Published

english-duration

Description

Spell out a time duration from a given input of seconds, in an English language sentence

Usage

Pass any (positive) number of seconds to get string describing the given time duration in English language. Number values will be returned as integers, not words. As this helper does not work with dates, no values indicating months will be returned.

Basic examples

englishDuration(3602)   // returns '1 hour and 2 seconds'
englishDuration(894492160)  // returns '28 years, 132 days, 22 hours, 2 minutes and 40 seconds'

/english-duration/

    Package Sidebar

    Install

    npm i english-duration

    Weekly Downloads

    0

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    3.9 kB

    Total Files

    5

    Last publish

    Collaborators

    • atomiko