title: trying to format a date on jade template
body: <p>I have an index.js:</p>
  
  <pre><code>exports.index = function(req, res){
    db.courses.find(function(err, currentCourses) {
      res.render('index', {
        currentCourses: currentCourses
      });
    });
  };
  </code></pre>
  
  <p>And on my jade template:</p>
  
  <pre><code>tr
      td #{currentCourses[0].start}
  </code></pre>
  
  <p>Which is a date, formatted as "Sun Sep 29 2013 00:00:00 GMT+0100 (BST)".</p>
  
  <p>How can I format it to "29 Sep 2013"?</p>
  
  <p>Edit (after Ed Hinchliffe's comments): </p>
  
  <pre><code>-function prettyDate(dateString){
      -var d = date.getDate(dateString);
      -var monthNames = [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ];
      -var m = monthNames[date.getMonth()];
      -var y = date.getFullYear();
      -return d+' '+m+' '+y;
  -} 
  for course in currentCourses
      tr
          td #{prettyDate(course.start)}
  </code></pre>