title: Change format date using javascript from timestamp php
body: <p>can javascript change the date format taken from php like this: <code>2018-09-22 05:20:48</code> to like this <code>Saturday,22 September</code> ? iam using vue.js and laravel. because this date is taken from the database using a query i dont know how to get int time and it will be passing to vue component.</p>
  
  <p><strong>Vue Component :</strong></p>
  
  <pre><code>    &lt;tr v-for="(category,index) in allCategories"&gt;
                    &lt;td class="v-align-middle"&gt; &lt;img :src="category.images[0].link" class="img-fluid categoriesImg" alt=""&gt; &lt;/td&gt;
                    &lt;td class="v-align-middle"&gt;{{category.category}}&lt;/td&gt;
                    &lt;td class="v-align-middle"&gt;{{formatDate(category.created_at)}}&lt;/td&gt;
                  &lt;/tr&gt;
  
  
  
  &lt;script&gt;
  
  
  
      import {mapGetters} from 'vuex';
  export default {
    name:"category",
    computed: {
        ...mapGetters({
          allCategories:'allCategories'
        }),
  
      },
      created(){
  
          // this.$swal('Hello Vue world!!!');
  
        this.$store.dispatch('GetAllCategories');
  
      },
      methods:{
        formatDate(date){
          let tanggal = new Date(date);
          return tanggal;
        },
      }
  
  }
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>Result</strong></p>
  
  <pre><code>"2018-09-21T22:20:48.000Z"
  </code></pre>