Skip to content

Instantly share code, notes, and snippets.

@JesusMurF
Last active November 7, 2016 10:05
Show Gist options
  • Save JesusMurF/e1c1398303bd7f7281fa to your computer and use it in GitHub Desktop.
Save JesusMurF/e1c1398303bd7f7281fa to your computer and use it in GitHub Desktop.
How to get the hours between two dates with Moment.js
var duration = moment.duration(end.diff(startTime));
var hours = duration.asHours();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment