Nemo's Parental Misguidance
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    time-sincepublic

    time-since

    Introduction

    This is a Node.js based module to convert timestamps to meaningful seconds, minutes, hours, days and weeks.

    Dependencies

    None, apart from Node.js itself.

    Examples

    Do an npm install time-since.

    var time = require("time-since");
     
    var epoch = new Date(0);
    console.log("ms: " + time.since(epoch).millis());
    console.log("s: " + time.since(epoch).secs());
    console.log("m: " + time.since(epoch).mins());
    console.log("h: " + time.since(epoch).hours());
    console.log("d: " + time.since(epoch).days());
    console.log("w: " + time.since(epoch).weeks());

    License

    Apache 2 (go mad)

    install

    npm i time-since

    Downloadsweekly downloads

    38

    version

    1.0.6

    license

    Apache-2.0

    repository

    githubgithub

    last publish

    collaborators

    • avatar