title: How to format a (possibly null/empty) date in VueJS
body: <p>Using Vue.JS 1.0, I couldn't find a simple way to properly format a JSON date that can be empty. </p>
  
  <p>I tried with <a href="https://www.npmjs.com/package/vue-filter#date" rel="nofollow">vue-filter npm package</a> <code>date filter</code> but it fails if the date is empty. For example if my data is:</p>
  
  <pre><code>{ name: "John", birthday: null },  /* unknown birthday */
  { name: "Maria", birthday: "2012-04-23T18:25:43.511Z" },
  </code></pre>
  
  <p>returns</p>
  
  <pre><code>John 12/31/1969 9:00:00 PM  &lt;-- null date should be blank 
  Maria 4/23/2012 3:25:43 PM  &lt;-- ok
  </code></pre>
  
  <p>The code i am using:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;&lt;html&gt;
  &lt;head&gt;
      &lt;script src="lib/vue/dist/vue.min.js"&gt;&lt;/script&gt;
      &lt;script src="lib/vue-filter/dist/vue-filter.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="app"&gt;
      &lt;h1&gt;Without Filter:&lt;/h1&gt;
      &lt;div v-for="person in list"&gt;
          &lt;div&gt;{{person.name}}  {{person.birthday}}&lt;/div&gt;
      &lt;/div&gt;
      &lt;h1&gt;With Filter:&lt;/h1&gt;
      &lt;div v-for="person in list"&gt;
          &lt;div&gt;{{person.name}}  {{person.birthday | date }}&lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;script&gt;
      new Vue({
          el: "#app",
          data: {
              list: [
                  { name: "John", birthday: null },
                  { name: "Maria", birthday: "2012-04-23T18:25:43.511Z" },
              ]
          }
      });
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>What is the proper way to format a date, that will also make show blank if date is null?</p>