moment-precise-range

0.2.0 • Public • Published

moment-precise-range

NPM version Build Status Coveralls Status Dependencies

A moment.js plugin to display human readable date/time ranges with precision.

Installation

npm install moment-precise-range --save

Usage

// Will be the moment return by the moment module, with preciseDiff appended
var moment = require('moment-precise-range');

var result = moment.preciseDiff(moment('2013-10-21 10:15:40', 'YYYY-MM-DD HH:mm:ss'),
                                moment('2014-02-02 01:01:01', 'YYYY-MM-DD HH:mm:ss'));

console.log(result); // 3 months 11 days 14 hours 45 minutes a few seconds

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    1,188
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    1,188
  • 0.1.1
    11
  • 0.1.0
    2
  • 0.0.0
    1

Package Sidebar

Install

npm i moment-precise-range

Weekly Downloads

308

Version

0.2.0

License

MIT

Last publish

Collaborators

  • mtscout6
  • psulek