How to use the quasar.date.formatDate function in quasar

To help you get started, we’ve selected a few quasar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hugetiny / negibox / src / shared / utils.js View on Github external
export function timeRemaining (totalLength, completedLength, downloadSpeed, gt1d) {
  const remainingLength = totalLength - completedLength
  let secs = Math.ceil(remainingLength / downloadSpeed)
  if (secs <= 0) {
    return ''
  } else if (secs > 86400) {
    return gt1d
  } else {
    return date.formatDate(secs, 'HH:mm:ss')
  }
  // if (secs > 86400) {
  //   return `${prefix} ${i.gt1d} ${suffix}`
  // }
  // if (secs > 3600) {
  //   hours = `${Math.floor(secs / 3600)}:`
  //   secs %= 3600
  //   minutes = `${Math.floor(secs / 60)}:`
  //   secs %= 60
  //   return
  // }
  // if (secs > 60) {
  //   minutes = `${Math.floor(secs / 60)}:`
  //   secs %= 60
  // }
}
github quasarframework / quasar / dev / components / form / datetime.vue View on Github external
data () {
    return {
      // model: '2016-09-18T10:45:00.000Z',
      model: undefined,
      modelVar: undefined,
      // model: 0,
      defaultValue: '2016-09-18T10:45:00.000Z',

      format: 'MMMM D, YYYY [at] h:mm [[]a[\\]]',

      minMaxModel: date.formatDate(day),

      min: date.subtractFromDate(day, {days: 5}),
      max: date.addToDate(day, {days: 4, month: 1, minutes: 10})
    }
  },
  computed: {
github openhab / org.openhab.ui.habot / web / src / pages / Chat.vue View on Github external
}).catch((error) => {
      vm.busy = false
      let errormessage = (error.response && error.response.data && error.response.data.error && error.response.data.error.message) ? error.response.data.error.message
        : (error.response && error.response.statusText) ? error.response.statusText : error.message
      vm.chats[0].messages.push({
        id: new Date(),
        name: '', // 'HABot',
        text: [errormessage],
        avatar: 'statics/icons/icon-192x192.png',
        bgColor: 'red',
        textColor: 'white',
        stamp: date.formatDate(new Date(), 'HH:mm')
      })
    })
github yunity / karrot-frontend / src / pickups / components / PickupSeriesEdit.vue View on Github external
get () {
        const endDate = addSeconds(this.edit.startDate, this.edit.duration)
        return date.formatDate(endDate, 'HH:mm')
      },
      set (val) {
github produvia / kryptos / frontend / src / pages / buildStrategy.vue View on Github external
today () {
      let today = Date.now()
      return date.formatDate(today, 'YYYY-MM-DD')
    },
    oneWeekAgo () {
github yunity / karrot-frontend / src / pickups / components / PickupEdit.vue View on Github external
get () {
        return date.formatDate(this.edit.dateEnd, 'HH:mm')
      },
      set (val) {
github aws-samples / aws-serverless-airline-booking / src / frontend / shared / models / BookingClass.js View on Github external
get bookingDate() {
    return date.formatDate(this.createdAt, "DD MMM YYYY");
  }
}
github yunity / karrot-frontend / src / pickups / components / PickupEdit.vue View on Github external
get () {
        return date.formatDate(this.edit.date, 'HH:mm')
      },
      set (val) {
github stormseed / daykeep-calendar-quasar / demo / pages / page-mixins / move-dates.js View on Github external
getSqlDateFormat: function (dateObject, withTime) {
      if (withTime) {
        return date.formatDate(dateObject, 'YYYY-MM-DDTHH:mm:ssZ')
      }
      else {
        return date.formatDate(dateObject, 'YYYY-MM-DD')
      }
    }
  }