Changeset 157 for trunk/SRC/Calendar/daysinmonth.pro
- Timestamp:
- 08/21/06 11:01:50 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Calendar/daysinmonth.pro
r155 r157 7 7 ; give the number of days in a specific month 8 8 ; 9 ; @categories calendar 9 ; @categories 10 ; Calendar 10 11 ; 11 ; @param month {in}{optional}{default=from "time" common variable of cm_4cal} 12 ; Scalar or array giving the month number for which we want to know the 13 ; number of days 14 ; 15 ; @param year {in}{optional}{default=from "time" common variable of cm_4cal} 16 ; To specify the year of the month. Used only if the common variable 12 ; @param YEAR {in}{optional}{default=from "time" common variable of cm_4cal} 13 ; To specify the year of the onth. Used only if the common variable 17 14 ; key_caltype = 'greg'. In that case, month and year must have the same 18 15 ; number of elements. 16 ; 17 ; @param MONTH 19 18 ; 20 19 ; @returns 21 20 ; number of days in a month or -1 in case of error 22 21 ; 23 ; @uses cm_4cal, updatenew 22 ; @uses 23 ; cm_4cal, updatenew 24 24 ; 25 25 ; @examples … … 27 27 ; 28 28 ; @history 29 ; 2/7/98 Sebastien Masson (smasson\@lodyc.jussieu.fr) 29 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 30 ; 2/7/98 30 31 ; update/review/english/new commons: June 2005 Sebastien Masson. 31 32 ; 32 ; @version $Id$ 33 ; @version 34 ; $Id$ 33 35 ; 34 36 ;- … … 49 51 IF n_elements(key_caltype) EQ 0 THEN key_caltype = 'greg' 50 52 CASE key_caltype OF 51 '360d':BEGIN 52 if n_elements(month) GT 1 THEN res = replicate(30, n_elements(month)) $ 53 ELSE res = replicate(30, n_elements(time)) 54 IF n_elements(res) EQ 1 THEN res = res[0] 55 return, res 56 END 53 '360d': if n_elements(month) GT 1 THEN $ 54 return, replicate(30, n_elements(month)) ELSE return, 30 57 55 'noleap':BEGIN 58 56 days_in_mth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
Note: See TracChangeset
for help on using the changeset viewer.