mobx-bonsai
    Preparing search index...

    Class ImmutableDateInternal

    Hierarchy

    • Omit<
          Date,
          | "setTime"
          | "setMilliseconds"
          | "setUTCMilliseconds"
          | "setSeconds"
          | "setUTCSeconds"
          | "setMinutes"
          | "setUTCMinutes"
          | "setHours"
          | "setUTCHours"
          | "setDate"
          | "setUTCDate"
          | "setMonth"
          | "setUTCMonth"
          | "setFullYear"
          | "setUTCFullYear",
      >
    • Date
      • ImmutableDate
    Index

    Constructors

    • Returns ImmutableDate

    • Parameters

      • value: string | number

      Returns ImmutableDate

    • Creates a new Date.

      Parameters

      • year: number

        The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.

      • monthIndex: number

        The month as a number between 0 and 11 (January to December).

      • Optionaldate: number

        The date as a number between 1 and 31.

      • Optionalhours: number

        Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.

      • Optionalminutes: number

        Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.

      • Optionalseconds: number

        Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.

      • Optionalms: number

        A number from 0 to 999 that specifies the milliseconds.

      Returns ImmutableDate

    • Parameters

      • value: string | number | Date

      Returns ImmutableDate

    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".

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

      Returns number

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

      Returns number

    • Gets the year, using local time.

      Returns number

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

      Returns number

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

      Returns number

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

      Returns number

    • Gets the month, using local time.

      Returns number

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

      Returns number

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

      Returns number

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

      Returns number

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

      Returns number

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

      Returns number

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

      Returns number

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

      Returns number

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

      Returns number

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

      Returns number

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

      Returns number

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

      Returns number

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

      Returns any

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

      Returns any

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

      Returns any

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

      Returns any

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

      Returns any

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

      Returns any

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

      Returns any

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

      Returns any

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

      Returns any

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

      Returns any

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

      Returns any

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

      Returns any

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

      Returns any

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

      Returns any

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

      Returns any

    • Returns a date as a string value.

      Returns string

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

      Returns string

    • 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

    • 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 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 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 a string representation of a date. The format of the string depends on the locale.

      Returns string

    • Returns a time as a string value.

      Returns string

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

      Returns string

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

      Returns number

    • Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC).

      Returns number

    • Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.

      Parameters

      • s: string

        A date string

      Returns number

    • Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.

      Parameters

      • year: number

        The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.

      • monthIndex: number

        The month as a number between 0 and 11 (January to December).

      • Optionaldate: number

        The date as a number between 1 and 31.

      • Optionalhours: number

        Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.

      • Optionalminutes: number

        Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.

      • Optionalseconds: number

        Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.

      • Optionalms: number

        A number from 0 to 999 that specifies the milliseconds.

      Returns number

    • Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.

      Parameters

      • year: number

        The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.

      • OptionalmonthIndex: number

        The month as a number between 0 and 11 (January to December).

      • Optionaldate: number

        The date as a number between 1 and 31.

      • Optionalhours: number

        Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.

      • Optionalminutes: number

        Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.

      • Optionalseconds: number

        Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.

      • Optionalms: number

        A number from 0 to 999 that specifies the milliseconds.

      Returns number