Compartir a través de


Year.IsLeap Property

Definition

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

public bool IsLeap { [Android.Runtime.Register("isLeap", "()Z", "", ApiSince=26)] get; }
[<get: Android.Runtime.Register("isLeap", "()Z", "", ApiSince=26)>]
member this.IsLeap : bool

Property Value

true if the year is leap, false otherwise

Attributes

Remarks

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.

Java documentation for java.time.Year.isLeap().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to