Miss any of our Open RFC calls?Watch the recordings here! »

mainspring

1.0.1 • Public • Published

mainspring

Latest Version Build Status

Installation

npm install mainspring

Usage

const mainspring = require('mainspring');
 
// Compare a date against now
mainspring(new Date(2023, 8, 24));
/* -> {
  inFuture: true,
  days: 2401,
  hours: 11,
  minutes: 16,
  seconds: 7
*/
 
// Compare two dates
mainspring(
  new Date(1962, 8, 12),
  new Date(1969, 5, 20)
);
/* -> {
  inFuture: false,
  days: 2473,
  hours: 0,
  minutes: 0,
  seconds: 0
}
*/

Testing

npm test

Keywords

none

Install

npm i mainspring

DownloadsWeekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

5.84 kB

Total Files

7

Last publish

Collaborators

  • avatar