./
leap_year.pro
topleap_year
result = leap_year(year [, NUMDAYS=NUMDAYS])
compute if an array of years are leap years
Return value
array of logic 1/0 where 1 is leap year and zero is not
Parameters
- year in required
array of any size/shape of years (of course leap years are only valid over a range of AD dates past ~4AD)
Keywords
- NUMDAYS in optional
if set returns the number of days in the year instead of a login 1/0
Examples
IDL> print, leap_year(findgen(2,5)+1900)
0 0
0 0
1 0
0 0
1 0
IDL> print, leap_year(findgen(10)+1900)
0 0 0 0 1 0 0 0 1 0
Author information
- History:
Thur Feb 8 16:37:16 2007, Brian Larsen written and tested
Statistics
| Lines: | 15 |
| McCabe complexity: |
File attributes
| Modifcation date: | Thu Feb 12 11:32:05 2009 |
| Lines: | 58 |
![[attach.png]](idldoc-resources/attach.png)