<!DOCTYPE html>
<html>

  <head>
    <script data-require="moment.js@*" data-semver="2.10.2" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/moment.min.js"></script>
    <link rel="stylesheet" href="style.css" />
    <script src="script.js"></script>
  </head>

  <body>
    <h1>Momemt Js Learning</h1>
    <h2>Getting Difference between two datetime in days</h2>
    <h2>Open your console to see the result</h2>
  </body>

</html>
// Code goes here
console.clear();
var now = moment(new Date()); //todays date
var end = moment("2015-12-1"); // another date
var duration = moment.duration(now.diff(end));
var days = duration.asDays();
console.log(days)
/* Styles go here */

This Plunkr deals with learning moment js