神岛 API 文档 - ArenaPro版
    Preparing search index...

    Interface DateTimeFormatOptions

    Intl.DateTimeFormat 对象提供配置选项的接口。

    An interface that provides configuration options for Intl.DateTimeFormat objects.

    interface DateTimeFormatOptions {
        day?: "numeric" | "2-digit";
        era?: "long" | "short" | "narrow";
        formatMatcher?: "best fit" | "basic";
        hour?: "numeric" | "2-digit";
        hour12?: boolean;
        localeMatcher?: "lookup" | "best fit";
        minute?: "numeric" | "2-digit";
        month?: "long" | "short" | "narrow" | "numeric" | "2-digit";
        second?: "numeric" | "2-digit";
        timeZone?: string;
        timeZoneName?:
            | "long"
            | "short"
            | "shortOffset"
            | "longOffset"
            | "shortGeneric"
            | "longGeneric";
        weekday?: "long"
        | "short"
        | "narrow";
        year?: "numeric" | "2-digit";
    }
    Index

    Properties

    day?: "numeric" | "2-digit"

    日期的表示方式。

    The representation of the day.

    era?: "long" | "short" | "narrow"

    纪元的表示方式。

    The representation of the era.

    formatMatcher?: "best fit" | "basic"

    要使用的格式匹配算法。

    The format matching algorithm to use.

    hour?: "numeric" | "2-digit"

    小时的表示方式。

    The representation of the hour.

    hour12?: boolean

    是否使用 12 小时制。

    Whether to use 12-hour time.

    localeMatcher?: "lookup" | "best fit"

    要使用的区域匹配算法。

    The locale matching algorithm to use.

    minute?: "numeric" | "2-digit"

    分钟的表示方式。

    The representation of the minute.

    month?: "long" | "short" | "narrow" | "numeric" | "2-digit"

    月份的表示方式。

    The representation of the month.

    second?: "numeric" | "2-digit"

    秒的表示方式。

    The representation of the second.

    timeZone?: string

    要使用的时区。

    The time zone to use.

    timeZoneName?:
        | "long"
        | "short"
        | "shortOffset"
        | "longOffset"
        | "shortGeneric"
        | "longGeneric"

    时区名称的表示方式。

    The representation of the time zone name.

    weekday?: "long" | "short" | "narrow"

    工作日的表示方式。

    The representation of the weekday.

    year?: "numeric" | "2-digit"

    年份的表示方式。

    The representation of the year.