Noosphere Possibilities Maximized

    hours-minutes-seconds

    2.0.0 • Public • Published

    hours-minutes-seconds

    constant width time eg. 12:34:56 or 03:02:01

    usage

    npm i hours-minutes-seconds

    or

    npm i -D hours-minutes-seconds

    Called with no arguments, the time will be the current time.

    import hms from 'hours-minutes-seconds';
    console.log(hms());  // 09:15:27 (if the time was quarter past nine in the morning)

    Alternatively pass a date object.

    import hms from 'hours-minutes-seconds';
    const timeIn30Minutes = new Date(+new Date() + 1.8e6);
    console.log(hms(timeIn30Minutes));  // 09:45:27 (if the time was quarter past nine in the morning)

    Install

    npm i hours-minutes-seconds

    DownloadsWeekly Downloads

    1

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    2.47 kB

    Total Files

    4

    Last publish

    Collaborators

    • paul-browne