Skip to content

trantrunghieu0809/moment-precise-range

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

moment-precise-range

Using the plugin, we can display the exact difference using the same 2 dates:

var m1 = moment('2014-01-01 12:00:00','YYYY-MM-DD HH:mm:ss');
var m2 = moment('2014-02-03 15:04:05','YYYY-MM-DD HH:mm:ss');
var diff = moment.preciseDiff(m1, m2); // return object {year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5}

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%