Skip to content

Instantly share code, notes, and snippets.

@tristanstraub
Created June 29, 2015 00:22
Show Gist options
  • Save tristanstraub/1b6f023513cf42f4952d to your computer and use it in GitHub Desktop.
Save tristanstraub/1b6f023513cf42f4952d to your computer and use it in GitHub Desktop.
Date difference across DST boundary.
<html>
<head>
<script src='https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.7.0/moment.js'></script>
<script>
console.log(moment('2015-04-30T00:00:00').diff(moment('2015-04-01T00:00:00'), 'hours'));
</script>
</head>
<body>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment