Home Reference Source
public class | source

IsoChronology

Extends:

Enum → IsoChronology

Static Method Summary

Static Public Methods
public static

isLeapYear(prolepticYear: number): boolean

Checks if the year is a leap year, according to the ISO proleptic calendar system rules.

Method Summary

Public Methods
public

date(temporal: *): *

Obtains an ISO local date from another date-time object.

public

resolveDate(fieldValues: *, resolverStyle: *): *

Inherited Summary

From class Enum
public

equals(other: *): *

public

toJSON(): string

toJSON() use by JSON.stringify delegates to toString()

public

toString(): *

Static Public Methods

public static isLeapYear(prolepticYear: number): boolean source

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.

Params:

NameTypeAttributeDescription
prolepticYear number

the ISO proleptic year to check

Return:

boolean

true if the year is leap, false otherwise

Public Methods

public date(temporal: *): * source

Obtains an ISO local date from another date-time object.

This is equivalent to {@link LocalDate#from(TemporalAccessor)}.

Params:

NameTypeAttributeDescription
temporal *

the date-time object to convert, not null

Return:

*

the ISO local date, not null

Throw:

*

DateTimeException if unable to create the date

public resolveDate(fieldValues: *, resolverStyle: *): * source

Params:

NameTypeAttributeDescription
fieldValues *
resolverStyle *

Return:

*