Changeset 93 for trunk/SRC/Calendar/leapyr.pro
- Timestamp:
- 06/07/06 19:12:14 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Calendar/leapyr.pro
r9 r93 1 1 ;----------------------------------------------------------------- 2 function leapyr, year3 2 ;+ 4 ; NAME: leapyr5 3 ; 6 ; PURPOSE:determine whether the input year is a leap year or not7 ; 8 ; 4 ; determine whether the input year is a leap year or not 5 ; Very useful for finding number of days in a year. 6 ; eg. NUM_DAYS_IN_YR = 365 + leapyr(year) 9 7 ; 10 ; CATEGORY: Utility8 ; @categories calendar 11 9 ; 12 ; CALLING SEQUENCE: result = leapyr(year)10 ; @param year {in}{required} year to be tested as a leap year 13 11 ; 14 ; INPUTS: year = test if year is a leap year 12 ; @returns 0 then not a leap year 13 ; 1 then year is a leap year 15 14 ; 16 ; OUTPUTS: result = 0 then not a leap year 17 ; = 1 then year is a leap year 15 ; @uses cm_4cal 18 16 ; 19 ; COMMON BLOCKS: cm_4cal 17 ; @examples 18 ; IDL> result = leapyr(2000) 20 19 ; 21 ; SIDE EFFECTS: 22 ; none. 23 ; MODIFICATION HISTORY: 20 ; @history 24 21 ; 25 ; 26 ; 22 ; Originally Written by: Trevor Harris, Physics Dept., University of Adelaide, 23 ;20/09/88 27 24 ; 28 25 ; November 2004: correction for century years... S. Masson; … … 40 37 ;- 41 38 ;------------------------------------------------------------ 39 function leapyr, year 42 40 ; include commons 43 41 @cm_4cal 44 ;------------------------------------------------------------45 42 yr = long(year) 46 43 IF n_elements(key_caltype) EQ 0 THEN key_caltype = 'greg'
Note: See TracChangeset
for help on using the changeset viewer.