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

    Enables basic storage and retrieval of dates and times.

    interface Date {
        "[toPrimitive]"(hint: "default"): string;
        "[toPrimitive]"(hint: "string"): string;
        "[toPrimitive]"(hint: "number"): number;
        "[toPrimitive]"(hint: string): string | number;
        "[toPrimitive]"(hint: "default"): string;
        "[toPrimitive]"(hint: "string"): string;
        "[toPrimitive]"(hint: "number"): number;
        "[toPrimitive]"(hint: string): string | number;
        getDate(): number;
        getDate(): number;
        getDay(): number;
        getDay(): number;
        getFullYear(): number;
        getFullYear(): number;
        getHours(): number;
        getHours(): number;
        getMilliseconds(): number;
        getMilliseconds(): number;
        getMinutes(): number;
        getMinutes(): number;
        getMonth(): number;
        getMonth(): number;
        getSeconds(): number;
        getSeconds(): number;
        getTime(): number;
        getTime(): number;
        getTimezoneOffset(): number;
        getTimezoneOffset(): number;
        getUTCDate(): number;
        getUTCDate(): number;
        getUTCDay(): number;
        getUTCDay(): number;
        getUTCFullYear(): number;
        getUTCFullYear(): number;
        getUTCHours(): number;
        getUTCHours(): number;
        getUTCMilliseconds(): number;
        getUTCMilliseconds(): number;
        getUTCMinutes(): number;
        getUTCMinutes(): number;
        getUTCMonth(): number;
        getUTCMonth(): number;
        getUTCSeconds(): number;
        getUTCSeconds(): number;
        setDate(date: number): number;
        setDate(date: number): number;
        setFullYear(year: number, month?: number, date?: number): number;
        setFullYear(year: number, month?: number, date?: number): number;
        setHours(hours: number, min?: number, sec?: number, ms?: number): number;
        setHours(hours: number, min?: number, sec?: number, ms?: number): number;
        setMilliseconds(ms: number): number;
        setMilliseconds(ms: number): number;
        setMinutes(min: number, sec?: number, ms?: number): number;
        setMinutes(min: number, sec?: number, ms?: number): number;
        setMonth(month: number, date?: number): number;
        setMonth(month: number, date?: number): number;
        setSeconds(sec: number, ms?: number): number;
        setSeconds(sec: number, ms?: number): number;
        setTime(time: number): number;
        setTime(time: number): number;
        setUTCDate(date: number): number;
        setUTCDate(date: number): number;
        setUTCFullYear(year: number, month?: number, date?: number): number;
        setUTCFullYear(year: number, month?: number, date?: number): number;
        setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
        setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
        setUTCMilliseconds(ms: number): number;
        setUTCMilliseconds(ms: number): number;
        setUTCMinutes(min: number, sec?: number, ms?: number): number;
        setUTCMinutes(min: number, sec?: number, ms?: number): number;
        setUTCMonth(month: number, date?: number): number;
        setUTCMonth(month: number, date?: number): number;
        setUTCSeconds(sec: number, ms?: number): number;
        setUTCSeconds(sec: number, ms?: number): number;
        toDateString(): string;
        toDateString(): string;
        toISOString(): string;
        toISOString(): string;
        toJSON(key?: any): string;
        toJSON(key?: any): string;
        toLocaleDateString(): string;
        toLocaleDateString(
            locales?: string | string[],
            options?: DateTimeFormatOptions,
        ): string;
        toLocaleDateString(
            locales?: LocalesArgument,
            options?: DateTimeFormatOptions,
        ): string;
        toLocaleDateString(): string;
        toLocaleDateString(
            locales?: string | string[],
            options?: DateTimeFormatOptions,
        ): string;
        toLocaleString(): string;
        toLocaleString(
            locales?: string | string[],
            options?: DateTimeFormatOptions,
        ): string;
        toLocaleString(
            locales?: LocalesArgument,
            options?: DateTimeFormatOptions,
        ): string;
        toLocaleString(): string;
        toLocaleString(
            locales?: string | string[],
            options?: DateTimeFormatOptions,
        ): string;
        toLocaleTimeString(): string;
        toLocaleTimeString(
            locales?: string | string[],
            options?: DateTimeFormatOptions,
        ): string;
        toLocaleTimeString(
            locales?: LocalesArgument,
            options?: DateTimeFormatOptions,
        ): string;
        toLocaleTimeString(): string;
        toLocaleTimeString(
            locales?: string | string[],
            options?: DateTimeFormatOptions,
        ): string;
        toString(): string;
        toString(): string;
        toTimeString(): string;
        toTimeString(): string;
        toUTCString(): string;
        toUTCString(): string;
        valueOf(): number;
        valueOf(): number;
    }
    Index

    Methods

    • Converts a Date object to a string.

      Parameters

      • hint: "default"

      Returns string

    • Converts a Date object to a string.

      Parameters

      • hint: "string"

      Returns string

    • Converts a Date object to a number.

      Parameters

      • hint: "number"

      Returns number

    • Converts a Date object to a string or number.

      Parameters

      • hint: string

        The strings "number", "string", or "default" to specify what primitive to return.

      Returns string | number

      A number if 'hint' was "number", a string if 'hint' was "string" or "default".

      If 'hint' was given something other than "number", "string", or "default".

    • Parameters

      • hint: "default"

      Returns string

      将 Date 对象转换为字符串。

      Converts a Date object to a string.

    • Parameters

      • hint: "string"

      Returns string

      将 Date 对象转换为字符串。

      Converts a Date object to a string.

    • Parameters

      • hint: "number"

      Returns number

      将 Date 对象转换为数字。

      Converts a Date object to a number.

    • Parameters

      • hint: string

      Returns string | number

      将 Date 对象转换为字符串或数字。

      Converts a Date object to a string or number.

      字符串 "number"、"string" 或 "default",用于指定返回哪种原始类型。

      The strings "number", "string", or "default" to specify what primitive to return.

      如果 'hint' 不是 "number"、"string" 或 "default"。

      If 'hint' was given something other than "number", "string", or "default".

      如果 'hint' 是 "number",则返回数字;如果 'hint' 是 "string" 或 "default",则返回字符串。

      A number if 'hint' was "number", a string if 'hint' was "string" or "default".

    • Gets the day-of-the-month, using local time.

      Returns number

    • Returns number

      使用本地时间获取月份中的日期。

      Gets the day-of-the-month, using local time.

    • Gets the day of the week, using local time.

      Returns number

    • Returns number

      使用本地时间获取星期几。

      Gets the day of the week, using local time.

    • Gets the year, using local time.

      Returns number

    • Returns number

      使用本地时间获取年份。

      Gets the year using local time.

    • Gets the hours in a date, using local time.

      Returns number

    • Returns number

      使用本地时间获取小时数。

      Gets the hour, using local time.

    • Gets the milliseconds of a Date, using local time.

      Returns number

    • Returns number

      使用本地时间获取 Date 对象中的毫秒数。

      Gets the milliseconds of a Date, using local time.

    • Gets the minutes of a Date object, using local time.

      Returns number

    • Returns number

      使用本地时间获取分钟数。

      Gets the minutes of a Date object, using local time.

    • Gets the month, using local time.

      Returns number

    • Returns number

      使用本地时间获取月份。

      Gets the month using local time.

    • Gets the seconds of a Date object, using local time.

      Returns number

    • Returns number

      使用本地时间获取秒数。

      Gets the seconds of a Date object, using local time.

    • Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC.

      Returns number

    • Returns number

      获取时间值(以毫秒为单位)。

      Gets the time value in milliseconds.

    • Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local computer.

      Returns number

    • Returns number

      获取本地计算机时间和协调世界时 (UTC) 之间的差值(以分钟为单位)。

      Gets the difference in minutes between the time on the local computer and Coordinated Universal Time (UTC).

    • Gets the day-of-the-month, using Universal Coordinated Time (UTC).

      Returns number

    • Returns number

      使用协调世界时 (UTC) 获取月份中的日期。

      Gets the day-of-the-month, using Coordinated Universal Time (UTC).

    • Gets the day of the week using Universal Coordinated Time (UTC).

      Returns number

    • Returns number

      使用协调世界时 (UTC) 获取星期几。

      Gets the day of the week using Coordinated Universal Time (UTC).

    • Gets the year using Universal Coordinated Time (UTC).

      Returns number

    • Returns number

      使用协调世界时 (UTC) 获取年份。

      Gets the year using Coordinated Universal Time (UTC).

    • Gets the hours value in a Date object using Universal Coordinated Time (UTC).

      Returns number

    • Returns number

      使用协调世界时 (UTC) 获取 Date 对象中的小时数。

      Gets the hours in a date, using Coordinated Universal Time (UTC).

    • Gets the milliseconds of a Date object using Universal Coordinated Time (UTC).

      Returns number

    • Returns number

      使用协调世界时 (UTC) 获取 Date 对象中的毫秒数。

      Gets the milliseconds of a Date object, using Coordinated Universal Time (UTC).

    • Gets the minutes of a Date object using Universal Coordinated Time (UTC).

      Returns number

    • Returns number

      使用协调世界时 (UTC) 获取 Date 对象中的分钟数。

      Gets the minutes of a Date object, using Coordinated Universal Time (UTC).

    • Gets the month of a Date object using Universal Coordinated Time (UTC).

      Returns number

    • Returns number

      使用协调世界时 (UTC) 获取月份。

      Gets the month using Coordinated Universal Time (UTC).

    • Gets the seconds of a Date object using Universal Coordinated Time (UTC).

      Returns number

    • Returns number

      使用协调世界时 (UTC) 获取 Date 对象中的秒数。

      Gets the seconds of a Date object, using Coordinated Universal Time (UTC).

    • Sets the numeric day-of-the-month value of the Date object using local time.

      Parameters

      • date: number

        A numeric value equal to the day of the month.

      Returns number

    • Parameters

      • date: number

      Returns number

      使用本地时间设置 Date 对象中的月份日期。

      Sets the numeric day-of-the-month value of the Date object using local time.

      一个等于月份日期的数字。

      A numeric value equal to the day of the month.

    • Sets the year of the Date object using local time.

      Parameters

      • year: number

        A numeric value for the year.

      • Optionalmonth: number

        A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.

      • Optionaldate: number

        A numeric value equal for the day of the month.

      Returns number

    • Parameters

      • year: number
      • Optionalmonth: number
      • Optionaldate: number

      Returns number

      使用本地时间设置 Date 对象中的年份。

      Sets the year of the Date object using local time.

      一个等于年份的数字。

      A numeric value for the year.

      可选参数,等于月份的数字。1 月为 0,其他月份依次递增。如果提供了 date 参数,则必须提供此参数。

      Optional. A numeric value equal to the month. The value for January is 0, and other months follow in sequence. If you specify the date parameter, you must also specify the month.

      可选参数,等于月份日期的数字。

      Optional. A numeric value equal to the day of the month.

    • Sets the hour value in the Date object using local time.

      Parameters

      • hours: number

        A numeric value equal to the hours value.

      • Optionalmin: number

        A numeric value equal to the minutes value.

      • Optionalsec: number

        A numeric value equal to the seconds value.

      • Optionalms: number

        A numeric value equal to the milliseconds value.

      Returns number

    • Parameters

      • hours: number
      • Optionalmin: number
      • Optionalsec: number
      • Optionalms: number

      Returns number

      使用本地时间设置 Date 对象中的小时数。

      Sets the hours value in the Date object using local time.

      一个等于小时数的数字。

      A numeric value equal to the hours value.

      可选参数,一个等于分钟数的数字。

      Optional. A numeric value equal to the minutes value.

      可选参数,一个等于秒数的数字。

      Optional. A numeric value equal to the seconds value.

      可选参数,一个等于毫秒值的数字。

      Optional. A numeric value equal to the milliseconds value.

    • Sets the milliseconds value in the Date object using local time.

      Parameters

      • ms: number

        A numeric value equal to the millisecond value.

      Returns number

    • Parameters

      • ms: number

      Returns number

      使用本地时间设置 Date 对象中的毫秒值。

      Sets the milliseconds value in the Date object using local time.

      一个等于毫秒值的数字。

      A numeric value equal to the millisecond value.

    • Sets the minutes value in the Date object using local time.

      Parameters

      • min: number

        A numeric value equal to the minutes value.

      • Optionalsec: number

        A numeric value equal to the seconds value.

      • Optionalms: number

        A numeric value equal to the milliseconds value.

      Returns number

    • Parameters

      • min: number
      • Optionalsec: number
      • Optionalms: number

      Returns number

      使用本地时间设置 Date 对象中的分钟数。

      Sets the minutes value in the Date object using local time.

      一个等于分钟数的数字。

      A numeric value equal to the minutes value.

      可选参数,一个等于秒数的数字。

      Optional. A numeric value equal to the seconds value.

      可选参数,一个等于毫秒值的数字。

      Optional. A numeric value equal to the milliseconds value.

    • Sets the month value in the Date object using local time.

      Parameters

      • month: number

        A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.

      • Optionaldate: number

        A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.

      Returns number

    • Parameters

      • month: number
      • Optionaldate: number

      Returns number

      使用本地时间设置 Date 对象中的月份。

      Sets the month value in the Date object using local time.

      一个等于月份的数字。1 月为 0,其他月份依次递增。

      A numeric value equal to the month. The value for January is 0, and other months follow in sequence.

      可选参数,等于月份日期的数字。如果未提供,则使用 getDate 方法的返回值。

      Optional. A numeric value representing the day of the month. If it is not supplied, the value from a call to the getDate method is used.

    • Sets the seconds value in the Date object using local time.

      Parameters

      • sec: number

        A numeric value equal to the seconds value.

      • Optionalms: number

        A numeric value equal to the milliseconds value.

      Returns number

    • Parameters

      • sec: number
      • Optionalms: number

      Returns number

      使用本地时间设置 Date 对象中的秒数。

      Sets the seconds value in the Date object using local time.

      一个等于秒数的数字。

      A numeric value equal to the seconds value.

      可选参数,一个等于毫秒值的数字。

      Optional. A numeric value equal to the milliseconds value.

    • Sets the date and time value in the Date object.

      Parameters

      • time: number

        A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.

      Returns number

    • Parameters

      • time: number

      Returns number

      设置 Date 对象中的日期和时间值。

      Sets the date and time value in the Date object.

      一个数值,表示自 1970 年 1 月 1 日午夜(GMT)以来经过的毫秒数。

      A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.

    • Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).

      Parameters

      • date: number

        A numeric value equal to the day of the month.

      Returns number

    • Parameters

      • date: number

      Returns number

      使用协调世界时 (UTC) 设置 Date 对象中的月份日期。

      Sets the numeric day-of-the-month value of the Date object using Coordinated Universal Time (UTC).

      一个等于月份日期的数字。

      A numeric value equal to the day of the month.

    • Sets the year value in the Date object using Universal Coordinated Time (UTC).

      Parameters

      • year: number

        A numeric value equal to the year.

      • Optionalmonth: number

        A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.

      • Optionaldate: number

        A numeric value equal to the day of the month.

      Returns number

    • Parameters

      • year: number
      • Optionalmonth: number
      • Optionaldate: number

      Returns number

      使用协调世界时 (UTC) 设置 Date 对象中的年份。

      Sets the year of the Date object using Coordinated Universal Time (UTC).

      一个等于年份的数字。

      A numeric value for the year.

      可选参数,等于月份的数字。1 月为 0,其他月份依次递增。如果提供了 date 参数,则必须提供此参数。

      Optional. A numeric value equal to the month. The value for January is 0, and other months follow in sequence. If you specify the date parameter, you must also specify the month.

      可选参数,等于月份日期的数字。

      Optional. A numeric value equal to the day of the month.

    • Sets the hours value in the Date object using Universal Coordinated Time (UTC).

      Parameters

      • hours: number

        A numeric value equal to the hours value.

      • Optionalmin: number

        A numeric value equal to the minutes value.

      • Optionalsec: number

        A numeric value equal to the seconds value.

      • Optionalms: number

        A numeric value equal to the milliseconds value.

      Returns number

    • Parameters

      • hours: number
      • Optionalmin: number
      • Optionalsec: number
      • Optionalms: number

      Returns number

      使用协调世界时 (UTC) 设置 Date 对象中的小时数。

      Sets the hours value in the Date object using Coordinated Universal Time (UTC).

      一个等于小时数的数字。

      A numeric value equal to the hours value.

      可选参数,一个等于分钟数的数字。

      Optional. A numeric value equal to the minutes value.

      可选参数,一个等于秒数的数字。

      Optional. A numeric value equal to the seconds value.

      可选参数,一个等于毫秒值的数字。

      Optional. A numeric value equal to the milliseconds value.

    • Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).

      Parameters

      • ms: number

        A numeric value equal to the millisecond value.

      Returns number

    • Parameters

      • ms: number

      Returns number

      使用协调世界时 (UTC) 设置 Date 对象中的毫秒值。

      Sets the milliseconds value in the Date object using Coordinated Universal Time (UTC).

      一个等于毫秒值的数字。

      A numeric value equal to the millisecond value.

    • Sets the minutes value in the Date object using Universal Coordinated Time (UTC).

      Parameters

      • min: number

        A numeric value equal to the minutes value.

      • Optionalsec: number

        A numeric value equal to the seconds value.

      • Optionalms: number

        A numeric value equal to the milliseconds value.

      Returns number

    • Parameters

      • min: number
      • Optionalsec: number
      • Optionalms: number

      Returns number

      使用协调世界时 (UTC) 设置 Date 对象中的分钟数。

      Sets the minutes value in the Date object using Coordinated Universal Time (UTC).

      一个等于分钟数的数字。

      A numeric value equal to the minutes value.

      可选参数,一个等于秒数的数字。

      Optional. A numeric value equal to the seconds value.

      可选参数,一个等于毫秒值的数字。

      Optional. A numeric value equal to the milliseconds value.

    • Sets the month value in the Date object using Universal Coordinated Time (UTC).

      Parameters

      • month: number

        A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.

      • Optionaldate: number

        A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.

      Returns number

    • Parameters

      • month: number
      • Optionaldate: number

      Returns number

      使用协调世界时 (UTC) 设置 Date 对象中的月份。

      Sets the month value in the Date object using Coordinated Universal Time (UTC).

      一个等于月份的数字。1 月为 0,其他月份依次递增。

      A numeric value equal to the month. The value for January is 0, and other months follow in sequence.

      可选参数,等于月份日期的数字。如果未提供,则使用 getUTCDate 方法的返回值。

      Optional. A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.

    • Sets the seconds value in the Date object using Universal Coordinated Time (UTC).

      Parameters

      • sec: number

        A numeric value equal to the seconds value.

      • Optionalms: number

        A numeric value equal to the milliseconds value.

      Returns number

    • Parameters

      • sec: number
      • Optionalms: number

      Returns number

      使用协调世界时 (UTC) 设置 Date 对象中的秒数。

      Sets the seconds value in the Date object using Coordinated Universal Time (UTC).

      一个等于秒数的数字。

      A numeric value equal to the seconds value.

      可选参数,一个等于毫秒值的数字。

      Optional. A numeric value equal to the milliseconds value.

    • Returns a date as a string value.

      Returns string

    • Returns string

      以字符串值返回日期。

      Returns a date as a string value.

    • Returns a date as a string value in ISO format.

      Returns string

    • Returns string

      将日期作为 ISO 格式的字符串值返回。

      Returns a date as a string value in ISO format.

    • Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization.

      Parameters

      • Optionalkey: any

      Returns string

    • Parameters

      • Optionalkey: any

      Returns string

      用于 JSON.stringify 方法,以便在将对象数据序列化为 JSON 时进行转换。

      Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization.

    • Returns a date as a string value appropriate to the host environment's current locale.

      Returns string

    • Converts a date to a string by using the current or specified locale.

      Parameters

      • Optionallocales: string | string[]

        A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.

      • Optionaloptions: DateTimeFormatOptions

        An object that contains one or more properties that specify comparison options.

      Returns string

    • Converts a date to a string by using the current or specified locale.

      Parameters

      • Optionallocales: LocalesArgument

        A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.

      • Optionaloptions: DateTimeFormatOptions

        An object that contains one or more properties that specify comparison options.

      Returns string

    • Returns string

      以适合主机环境当前本地化设置的字符串值返回日期。

      Returns a date as a string value appropriate to the host environment's current locale.

    • Parameters

      Returns string

      使用当前或指定的区域设置将日期转换为字符串。

      Converts a date to a string by using the current or specified locale.

      一个或多个语言或区域设置标记的区域设置字符串或区域设置字符串数组。如果包含多个区域设置字符串,请按优先级降序列出,以便第一个条目是首选区域设置。如果省略此参数,则使用 JavaScript 运行时的默认区域设置。

      A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.

      一个包含一个或多个指定比较选项的属性的对象。

      An object that contains one or more properties that specify comparison options.

    • Returns a value as a string value appropriate to the host environment's current locale.

      Returns string

    • Converts a date and time to a string by using the current or specified locale.

      Parameters

      • Optionallocales: string | string[]

        A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.

      • Optionaloptions: DateTimeFormatOptions

        An object that contains one or more properties that specify comparison options.

      Returns string

    • Converts a date and time to a string by using the current or specified locale.

      Parameters

      • Optionallocales: LocalesArgument

        A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.

      • Optionaloptions: DateTimeFormatOptions

        An object that contains one or more properties that specify comparison options.

      Returns string

    • Returns string

      以适合主机环境当前本地化设置的字符串值返回值。

      Returns a value as a string value appropriate to the host environment's current locale.

    • Parameters

      Returns string

      使用当前或指定的区域设置将日期和时间转换为字符串。

      Converts a date and time to a string by using the current or specified locale.

      一个或多个语言或区域设置标记的区域设置字符串或区域设置字符串数组。如果包含多个区域设置字符串,请按优先级降序列出,以便第一个条目是首选区域设置。如果省略此参数,则使用 JavaScript 运行时的默认区域设置。

      A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.

      一个包含一个或多个指定比较选项的属性的对象。

      An object that contains one or more properties that specify comparison options.

    • Returns a time as a string value appropriate to the host environment's current locale.

      Returns string

    • Converts a time to a string by using the current or specified locale.

      Parameters

      • Optionallocales: string | string[]

        A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.

      • Optionaloptions: DateTimeFormatOptions

        An object that contains one or more properties that specify comparison options.

      Returns string

    • Converts a time to a string by using the current or specified locale.

      Parameters

      • Optionallocales: LocalesArgument

        A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.

      • Optionaloptions: DateTimeFormatOptions

        An object that contains one or more properties that specify comparison options.

      Returns string

    • Returns string

      以适合主机环境当前本地化设置的字符串值返回时间。

      Returns a time as a string value appropriate to the host environment's current locale.

    • Parameters

      Returns string

      使用当前或指定的区域设置将时间转换为字符串。

      Converts a time to a string by using the current or specified locale.

      一个或多个语言或区域设置标记的区域设置字符串或区域设置字符串数组。如果包含多个区域设置字符串,请按优先级降序列出,以便第一个条目是首选区域设置。如果省略此参数,则使用 JavaScript 运行时的默认区域设置。

      A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.

      一个包含一个或多个指定比较选项的属性的对象。

      An object that contains one or more properties that specify comparison options.

    • Returns a string representation of a date. The format of the string depends on the locale.

      Returns string

    • Returns string

      返回日期的字符串表示形式。字符串的格式取决于本地化设置。

      Returns a string representation of a date. The format of the string depends on the locale specific conventions.

    • Returns a time as a string value.

      Returns string

    • Returns string

      以字符串值返回时间。

      Returns a time as a string value.

    • Returns a date converted to a string using Universal Coordinated Time (UTC).

      Returns string

    • Returns string

      将日期转换为使用协调世界时 (UTC) 的字符串。

      Converts a date to a string using Coordinated Universal Time (UTC).

    • Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC.

      Returns number

    • Returns number

      返回自 1970 年 1 月 1 日午夜(UTC)以来的存储时间值(以毫秒为单位)。

      Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC.