Skip to content

vue-i18n / general / DateTimeOptions

Interface: DateTimeOptions<Key, Locales>

Vue I18n General

DateTime options

Remarks

Options for Datetime formatting API

Extends

  • DateTimeFormatOptions.LocaleOptions<Locales>

Type Parameters

Type ParameterDefault type
Keystring
LocalesLocale

Properties

calendar?

ts
optional calendar: string;

Inherited from

ts
Intl.DateTimeFormatOptions.calendar

dateStyle?

ts
optional dateStyle: "long" | "short" | "full" | "medium";

Inherited from

ts
Intl.DateTimeFormatOptions.dateStyle

day?

ts
optional day: "numeric" | "2-digit";

Inherited from

ts
Intl.DateTimeFormatOptions.day

dayPeriod?

ts
optional dayPeriod: "long" | "short" | "narrow";

Inherited from

ts
Intl.DateTimeFormatOptions.dayPeriod

era?

ts
optional era: "long" | "short" | "narrow";

Inherited from

ts
Intl.DateTimeFormatOptions.era

fallbackWarn?

ts
optional fallbackWarn: boolean;

Remarks

Whether do resolve on format keys when your language lacks a formatting for a key


formatMatcher?

ts
optional formatMatcher: "best fit" | "basic";

Inherited from

ts
Intl.DateTimeFormatOptions.formatMatcher

fractionalSecondDigits?

ts
optional fractionalSecondDigits: 1 | 2 | 3;

Inherited from

ts
Intl.DateTimeFormatOptions.fractionalSecondDigits

hour?

ts
optional hour: "numeric" | "2-digit";

Inherited from

ts
Intl.DateTimeFormatOptions.hour

hour12?

ts
optional hour12: boolean;

Inherited from

ts
Intl.DateTimeFormatOptions.hour12

hourCycle?

ts
optional hourCycle: "h11" | "h12" | "h23" | "h24";

Inherited from

ts
Intl.DateTimeFormatOptions.hourCycle

key?

ts
optional key: Key;

Remarks

The target format key


locale?

ts
optional locale: LocaleDetector<any[]> | Locales;

Remarks

The locale of localization

Inherited from

ts
LocaleOptions.locale

localeMatcher?

ts
optional localeMatcher: "lookup" | "best fit";

Inherited from

ts
Intl.DateTimeFormatOptions.localeMatcher

minute?

ts
optional minute: "numeric" | "2-digit";

Inherited from

ts
Intl.DateTimeFormatOptions.minute

missingWarn?

ts
optional missingWarn: boolean;

Remarks

Whether suppress warnings outputted when localization fails


month?

ts
optional month: "long" | "short" | "narrow" | "numeric" | "2-digit";

Inherited from

ts
Intl.DateTimeFormatOptions.month

numberingSystem?

ts
optional numberingSystem: string;

Inherited from

ts
Intl.DateTimeFormatOptions.numberingSystem

part?

ts
optional part: boolean;

Remarks

Whether to use Intel.DateTimeFormat#formatToParts


second?

ts
optional second: "numeric" | "2-digit";

Inherited from

ts
Intl.DateTimeFormatOptions.second

timeStyle?

ts
optional timeStyle: "long" | "short" | "full" | "medium";

Inherited from

ts
Intl.DateTimeFormatOptions.timeStyle

timeZone?

ts
optional timeZone: string;

Inherited from

ts
Intl.DateTimeFormatOptions.timeZone

timeZoneName?

ts
optional timeZoneName: 
  | "long"
  | "short"
  | "shortOffset"
  | "longOffset"
  | "shortGeneric"
  | "longGeneric";

Inherited from

ts
Intl.DateTimeFormatOptions.timeZoneName

weekday?

ts
optional weekday: "long" | "short" | "narrow";

Inherited from

ts
Intl.DateTimeFormatOptions.weekday

year?

ts
optional year: "numeric" | "2-digit";

Inherited from

ts
Intl.DateTimeFormatOptions.year

Released under the MIT License.