How to use date-format-parse - 7 common examples

To help you get started, we’ve selected a few date-format-parse 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 mengxiong10 / vue2-datepicker / src / date-picker.vue View on Github external
formatDate(date, fmt) {
      if (isObject(this.format) && typeof this.format.stringify === 'function') {
        return this.format.stringify(date, fmt);
      }
      return format(date, fmt, { locale: this.locale.formatLocale });
    },
    // transform the outer value to inner date
github mengxiong10 / vue2-datepicker / src / calendar / table-date.vue View on Github external
formatDate(date, fmt) {
      return format(date, fmt, { locale: this.t('formatLocale') });
    },
    handleCellClick(evt) {
github mengxiong10 / vue2-datepicker / src / time / list-options.vue View on Github external
formatDate(date, fmt) {
      return format(date, fmt, { locale: this.t('formatLocale') });
    },
    scrollToSelected() {
github mengxiong10 / vue2-datepicker / src / calendar / calendar-panel.vue View on Github external
formatDate(date, fmt) {
      return format(date, fmt, { locale: this.t('formatLocale') });
    },
    initCalendar() {
github mengxiong10 / vue2-datepicker / src / time / time-panel.vue View on Github external
formatDate(date, fmt) {
      return format(date, fmt, { locale: this.t('formatLocale') });
    },
    isDisabled(date) {
github mengxiong10 / vue2-datepicker / src / date-picker.vue View on Github external
parseDate(value, fmt) {
      if (isObject(this.format) && typeof this.format.parse === 'function') {
        return this.format.parse(value, fmt);
      }
      const backupDate = new Date();
      return parse(value, fmt, { locale: this.locale.formatLocale, backupDate });
    },
    formatDate(date, fmt) {
github mengxiong10 / vue2-datepicker / src / date-picker.vue View on Github external
getWeek(date, options) {
      if (isObject(this.format) && typeof this.format.getWeek === 'function') {
        return this.format.getWeek(date, options);
      }
      return getWeek(date, options);
    },
    parseDate(value, fmt) {

date-format-parse

Lightweight date format and parse

MIT
Latest version published 3 years ago

Package Health Score

47 / 100
Full package analysis