title: Making a simple timeline with moment JS
body: <p>Im trying to create a simple report where I get entries from an ajax request and I want to simply group my entries by the day of the week. For example I want to come out something simple as:</p>
  
  <pre><code>-----------------------------------
  Monday - May 2nd - 2016
  -----------------------------------
  Entry 1 
  Description
  Date: 2016-05-02 09:45
  -----------------------------------
  Entry 2 
  Description
  Date: 2016-05-02 10:55
  -----------------------------------
  
  -----------------------------------
  Tuesday - May 3rd - 2016
  -----------------------------------
  Entry 3
  Description
  Date: 2016-05-03 11:55
  -----------------------------------
  Entry 4
  Description
  Date: 2016-05-03 13:55
  -----------------------------------
  
  -----------------------------------
  Wednesday - May 4th - 2016
  -----------------------------------
  No entries to report ....
  -----------------------------------
  
  etc ...
  </code></pre>
  
  <p>Here is a jsfiddle of what I got going so far:
  <a href="https://jsfiddle.net/vLdn68ko/" rel="nofollow">https://jsfiddle.net/vLdn68ko/</a></p>
  
  <p>I know you can get the day of the week with Moment JS <code>moment().format('dddd');</code> but what im having issues with is how to get the logic working so that it groups by the day of the week? Not quite sure how to get start with that. Anyone have any idea?</p>
  
  <p>Here is the code I have so far:</p>
  
  <pre><code>$.ajax({url:"/SomeUrlBeginninWithSlash",
              dataType: 'json',
              cache: false,
              success: function (data) {
  
                      $.each(data.d.results, function (index, incident) {
  
                                      $('body').append(
                    "&lt;table border='1'&gt;"+
                                          "&lt;TR&gt;&lt;TD&gt;Entry ID is"+incident.ID+"&lt;/TD&gt;&lt;/TR&gt;"+
                      "&lt;TR&gt;&lt;TD&gt;Description: "+incident.Description+"&lt;/TD&gt;&lt;/TR&gt;"+
                      "&lt;TR&gt;&lt;TD&gt;Date: "+incident.Date+"&lt;/TD&gt;&lt;/TR&gt;"+
                                      "&lt;/table&gt;"+
                    "&lt;br&gt;&lt;br&gt;"
  
                    );
  
                                  })
              }
          });
  </code></pre>