title: Don't want to display the year only if it is current year ,in moment.js
body: <p>I have this code to transform date to a readable time format</p>
  
  <pre><code>$('time').each(function (i, e) {
  
          if ($(e).attr("class") == 'mtime') {
  
              var now = moment();
              moment.lang('en', {
                  calendar : {
                      lastDay : '[Yesterday] LT',
                      sameDay : 'LT',
                      nextDay : '[Tomorrow,] LT',
                      lastWeek : 'ddd LT',
                      nextWeek : 'ddd LT',
                      sameElse : 'MMM D[/]YY' //something to do with this?
                  }
  
              });
  
              var elem = $(e).attr('datetime');
              var time = moment($(e).attr('datetime'));
              var diff = now.diff(time, 'days');
  
              $(e).html(time.calendar());
  
          }
  
  });
  </code></pre>
  
  <p>returned output:</p>
  
  <pre><code>&lt;time class="mtime" datetime="2016-02-26 10:31:22" title="2016-02-26 10:31:22"&gt;Feb 26/16&lt;/time&gt;
  </code></pre>
  
  <p>The problem is how can I hide the year if current year. And if past year format it to "M/D/YY".</p>
  
  <p>expected output:</p>
  
  <pre><code>- &lt;time&gt;Feb 26&lt;/time&gt; &lt;!--// current year --&gt;
  - &lt;time&gt;12/25/15&lt;/time&gt; &lt;!--// last year --&gt;
  - &lt;time&gt;8/1/14&lt;/time&gt; &lt;!--// last year --&gt;
  </code></pre>
  
  <p>Kindly advise guys! TIA</p>