declare namespace java { namespace time { namespace chrono { /** * The ISO calendar system. *

* This chronology defines the rules of the ISO calendar system. * This calendar system is based on the ISO-8601 standard, which is the * de facto world calendar. *

* The fields are defined as follows: *

* @implSpec This class is immutable and thread-safe. * @since 1.8 */ // @ts-ignore class IsoChronology extends java.time.chrono.AbstractChronology implements java.io.Serializable { /** * Singleton instance of the ISO chronology. */ // @ts-ignore public static readonly INSTANCE: java.time.chrono.IsoChronology /** * Gets the ID of the chronology - 'ISO'. *

* The ID uniquely identifies the {@code Chronology}. * It can be used to lookup the {@code Chronology} using {@link Chronology#of(String)}. * @return the chronology ID - 'ISO' * @see #getCalendarType() */ // @ts-ignore public getId(): string /** * Gets the calendar type of the underlying calendar system - 'iso8601'. *

* The calendar type is an identifier defined by the * Unicode Locale Data Markup Language (LDML) specification. * It can be used to lookup the {@code Chronology} using {@link Chronology#of(String)}. * It can also be used as part of a locale, accessible via * {@link Locale#getUnicodeLocaleType(String)} with the key 'ca'. * @return the calendar system type - 'iso8601' * @see #getId() */ // @ts-ignore public getCalendarType(): string /** * Obtains an ISO local date from the era, year-of-era, month-of-year * and day-of-month fields. * @param era the ISO era, not null * @param yearOfEra the ISO year-of-era * @param month the ISO month-of-year * @param dayOfMonth the ISO day-of-month * @return the ISO local date, not null * @throws DateTimeException if unable to create the date * @throws ClassCastException if the type of {#code era} is not {@code IsoEra} */ // @ts-ignore public date(era: java.time.chrono.Era, yearOfEra: number /*int*/, month: number /*int*/, dayOfMonth: number /*int*/): java.time.LocalDate /** * Obtains an ISO local date from the proleptic-year, month-of-year * and day-of-month fields. *

* This is equivalent to {@link LocalDate#of(int, int, int)}. * @param prolepticYear the ISO proleptic-year * @param month the ISO month-of-year * @param dayOfMonth the ISO day-of-month * @return the ISO local date, not null * @throws DateTimeException if unable to create the date */ // @ts-ignore public date(prolepticYear: number /*int*/, month: number /*int*/, dayOfMonth: number /*int*/): java.time.LocalDate /** * Obtains an ISO local date from the era, year-of-era and day-of-year fields. * @param era the ISO era, not null * @param yearOfEra the ISO year-of-era * @param dayOfYear the ISO day-of-year * @return the ISO local date, not null * @throws DateTimeException if unable to create the date */ // @ts-ignore public dateYearDay(era: java.time.chrono.Era, yearOfEra: number /*int*/, dayOfYear: number /*int*/): java.time.LocalDate /** * Obtains an ISO local date from the proleptic-year and day-of-year fields. *

* This is equivalent to {@link LocalDate#ofYearDay(int, int)}. * @param prolepticYear the ISO proleptic-year * @param dayOfYear the ISO day-of-year * @return the ISO local date, not null * @throws DateTimeException if unable to create the date */ // @ts-ignore public dateYearDay(prolepticYear: number /*int*/, dayOfYear: number /*int*/): java.time.LocalDate /** * Obtains an ISO local date from the epoch-day. *

* This is equivalent to {@link LocalDate#ofEpochDay(long)}. * @param epochDay the epoch day * @return the ISO local date, not null * @throws DateTimeException if unable to create the date */ // @ts-ignore public dateEpochDay(epochDay: number /*long*/): java.time.LocalDate /** * Obtains an ISO local date from another date-time object. *

* This is equivalent to {@link LocalDate#from(TemporalAccessor)}. * @param temporal the date-time object to convert, not null * @return the ISO local date, not null * @throws DateTimeException if unable to create the date */ // @ts-ignore public date(temporal: java.time.temporal.TemporalAccessor): java.time.LocalDate /** * Obtains an ISO local date-time from another date-time object. *

* This is equivalent to {@link LocalDateTime#from(TemporalAccessor)}. * @param temporal the date-time object to convert, not null * @return the ISO local date-time, not null * @throws DateTimeException if unable to create the date-time */ // @ts-ignore public localDateTime(temporal: java.time.temporal.TemporalAccessor): java.time.LocalDateTime /** * Obtains an ISO zoned date-time from another date-time object. *

* This is equivalent to {@link ZonedDateTime#from(TemporalAccessor)}. * @param temporal the date-time object to convert, not null * @return the ISO zoned date-time, not null * @throws DateTimeException if unable to create the date-time */ // @ts-ignore public zonedDateTime(temporal: java.time.temporal.TemporalAccessor): java.time.ZonedDateTime /** * Obtains an ISO zoned date-time in this chronology from an {@code Instant}. *

* This is equivalent to {@link ZonedDateTime#ofInstant(Instant, ZoneId)}. * @param instant the instant to create the date-time from, not null * @param zone the time-zone, not null * @return the zoned date-time, not null * @throws DateTimeException if the result exceeds the supported range */ // @ts-ignore public zonedDateTime(instant: java.time.Instant, zone: java.time.ZoneId): java.time.ZonedDateTime /** * Obtains the current ISO local date from the system clock in the default time-zone. *

* This will query the {@link Clock#systemDefaultZone() system clock} in the default * time-zone to obtain the current date. *

* Using this method will prevent the ability to use an alternate clock for testing * because the clock is hard-coded. * @return the current ISO local date using the system clock and default time-zone, not null * @throws DateTimeException if unable to create the date */ // @ts-ignore public dateNow(): java.time.LocalDate /** * Obtains the current ISO local date from the system clock in the specified time-zone. *

* This will query the {@link Clock#system(ZoneId) system clock} to obtain the current date. * Specifying the time-zone avoids dependence on the default time-zone. *

* Using this method will prevent the ability to use an alternate clock for testing * because the clock is hard-coded. * @return the current ISO local date using the system clock, not null * @throws DateTimeException if unable to create the date */ // @ts-ignore public dateNow(zone: java.time.ZoneId): java.time.LocalDate /** * Obtains the current ISO local date from the specified clock. *

* This will query the specified clock to obtain the current date - today. * Using this method allows the use of an alternate clock for testing. * The alternate clock may be introduced using {@link Clock dependency injection}. * @param clock the clock to use, not null * @return the current ISO local date, not null * @throws DateTimeException if unable to create the date */ // @ts-ignore public dateNow(clock: java.time.Clock): java.time.LocalDate /** * Checks if the year is a leap year, according to the ISO proleptic * calendar system rules. *

* This method applies the current rules for leap years across the whole time-line. * In general, a year is a leap year if it is divisible by four without * remainder. However, years divisible by 100, are not leap years, with * the exception of years divisible by 400 which are. *

* For example, 1904 is a leap year it is divisible by 4. * 1900 was not a leap year as it is divisible by 100, however 2000 was a * leap year as it is divisible by 400. *

* The calculation is proleptic - applying the same rules into the far future and far past. * This is historically inaccurate, but is correct for the ISO-8601 standard. * @param prolepticYear the ISO proleptic year to check * @return true if the year is leap, false otherwise */ // @ts-ignore public isLeapYear(prolepticYear: number /*long*/): boolean // @ts-ignore public prolepticYear(era: java.time.chrono.Era, yearOfEra: number /*int*/): number /*int*/ // @ts-ignore public eraOf(eraValue: number /*int*/): java.time.chrono.IsoEra // @ts-ignore public eras(): Array /** * Resolves parsed {@code ChronoField} values into a date during parsing. *

* Most {@code TemporalField} implementations are resolved using the * resolve method on the field. By contrast, the {@code ChronoField} class * defines fields that only have meaning relative to the chronology. * As such, {@code ChronoField} date fields are resolved here in the * context of a specific chronology. *

* {@code ChronoField} instances on the ISO calendar system are resolved * as follows. *

* @param fieldValues the map of fields to values, which can be updated, not null * @param resolverStyle the requested type of resolve, not null * @return the resolved date, null if insufficient information to create a date * @throws DateTimeException if the date cannot be resolved, typically * because of a conflict in the input data */ // @ts-ignore public resolveDate(fieldValues: java.util.Map, resolverStyle: java.time.format.ResolverStyle): java.time.LocalDate // @ts-ignore public range(field: java.time.temporal.ChronoField): java.time.temporal.ValueRange /** * Obtains a period for this chronology based on years, months and days. *

* This returns a period tied to the ISO chronology using the specified * years, months and days. See {@link Period} for further details. * @param years the number of years, may be negative * @param months the number of years, may be negative * @param days the number of years, may be negative * @return the period in terms of this chronology, not null * @return the ISO period, not null */ // @ts-ignore public period(years: number /*int*/, months: number /*int*/, days: number /*int*/): java.time.Period } } } }