icu
    Preparing search index...

    Class Date

    An ICU4X Date object capable of containing a date for any calendar.

    See the Rust documentation for Date for more information.

    Index

    Accessors

    • get extendedYear(): number

      Returns the extended year, which can be used for

      This year number can be used when you need a simple numeric representation of the year, and can be meaningfully compared with extended years from other eras or used in arithmetic.

      See the Rust documentation for extended_year for more information.

      Returns number

    • get ordinalMonth(): number

      Returns 1-indexed number of the month of this date in its year

      Note that for lunar calendars this may not lead to the same month having the same ordinal month across years; use month_code if you care about month identity.

      See the Rust documentation for month for more information.

      See the Rust documentation for ordinal for more information.

      Returns number

    Methods

    • Creates a new Date from the given codes, which are interpreted in the given calendar system

      An empty era code will treat the year as an extended year

      See the Rust documentation for try_new for more information.

      See the Rust documentation for try_from_str for more information.

      Parameters

      • eraCode: string
      • year: number
      • monthCode: string
      • day: number
      • calendar: Calendar

      Returns Date