friendly-time

    1.1.1 • Public • Published

    friendly-time

    npm Travis Codecov

    Prints human friendly timestamps (eg. just now, 5 minutes ago, 3 days from now).

    Usage

    var friendlyTime = require('friendly-time');
     
    var now = new Date();
    var minutes = new Date(now - (1000 * 60 * 5));
    var days = new Date(now + (1000 * 60 * 60 * 24 * 3));
     
    friendlyTime(now); // just now
    friendlyTime(minutes); // 5 minutes ago
    friendlyTime(days); // 3 days from now

    Install

    npm i friendly-time

    DownloadsWeekly Downloads

    217

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    137 kB

    Total Files

    6

    Last publish

    Collaborators

    • brams-dev