| Aerospace Toolbox | ![]() |
ly = leapyear(year)
ly = leapyear(year) determines whether one or more years are leap years or not. The output, ly, is a logical array. year should be numeric.
Determine whether 2005 is a leap year:
ly = leapyear(2005) ly = 0
Determine whether 2000, 2005, and 2020 are leap years:
ly = leapyear([2000 2005 2020]) ly = 1 0 1
The determination of leap years is done by Gregorian calendar rules.
decyear, juliandate, mjuliandate
![]() | juliandate | lla2ecef | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |