Skip to content

Instantly share code, notes, and snippets.

@JesusMurF
Last active November 7, 2016 10:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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