Skip to content

pdkpavankumar/from-this-moment

Repository files navigation

from-this-moment

Build Status dependencies Status devDependencies Status License: MIT

A light weight npm moulde gives the time difference

Happy hacking =)

Installation

npm install --save from-this-moment

Usage

import ftm from 'from-this-moment' (or)

var ftm = require('from-this-moment')

ftm(dateTo, dateFrom)

by default dateFrom is referenced to the current timedate.

ftm('Sat Mar 24 2019 0:32:01 GMT+0530 (India Standard Time)');

output: 23 minutes ago

ftm('Sat Mar 25 2019 0:32:01 GMT+0530 (India Standard Time)');

output: In 23 hours

ftm('Sat Mar 25 2017 0:32:01 GMT+0530 (India Standard Time)', 'Sat Mar 25 2019 0:32:01 GMT+0530 (India Standard Time)');

output: 2 years ago

License

MIT © PDK Pavan Kumar

About

A light weight npm moulde gives the time difference

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 2

  •  
  •