quasar icon indicating copy to clipboard operation
quasar copied to clipboard

date.formatDate(d,'YYYYww')

Open llin55 opened this issue 8 years ago • 0 comments

Software version

Quasar: 0.15.6 OS: Node: NPM: Browsers: iOS: Android: Any other software related to your bug:

JsFiddle (for Quasar v0.15+ only)

<div id="q-app">
  <div class="q-ma-md">
   date string: {{d.string}}<br/>
   week formatted: {{d.week}}<br/>
  </div>
</div>

import {date} from 'quasar'

new Vue({
  el: '#q-app',
  data: function () {
    return {
    }
  },
  computed: {
  	d () {
    	const d = new Date('Sun Jan 01 2017 00:00:00 GMT+0100 (CET)')
      return {
      	string : d,
      	week: date.formatDate(d,'YYYYww')
       }
    }
  },
})

What did you get as the error?

date string: Sun Jan 01 2017 00:00:00 GMT+0100 (CET) week formatted: 201752

What were you expecting?

date string: Sun Jan 01 2017 00:00:00 GMT+0100 (CET) week formatted: 201652

What steps did you take, to get the error?

llin55 avatar Mar 06 '18 11:03 llin55