Changeset 9 for trunk/Obsolete/jourdsmois.pro
- Timestamp:
- 04/26/06 16:29:38 (18 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Obsolete/jourdsmois.pro
r7 r9 5 5 ; NAME:jourdsmois 6 6 ; 7 ; PURPOSE:donne le nombre de jours ds le mois month de l'annee year 8 ; 9 ; CATEGORY: 10 ; 11 ; CALLING SEQUENCE:result=jourdsmois() 12 ; 13 ; INPUTS:optionnels 14 ; mois et annee 15 ; 16 ; KEYWORD PARAMETERS: 17 ; 18 ; OUTPUTS: 19 ; 20 ; COMMON BLOCKS: 21 ; common.pro leapyr.pro 22 ; 23 ; SIDE EFFECTS: 24 ; 25 ; RESTRICTIONS: 26 ; 27 ; EXAMPLE: 7 ; PURPOSE: 8 ; obsolete, used daysinmonth instead... 28 9 ; 29 10 ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr) 30 ; 2/7/9831 11 ;- 12 ; June 2005: Sebastien Masson, english version 32 13 ;------------------------------------------------------------ 33 14 ;------------------------------------------------------------ 34 15 ;------------------------------------------------------------ 35 function jourdsmois, mois,annee 36 @common 37 ;------------------------------------------------------------ 38 case n_params() of 39 1:month=mois 40 2:begin 41 month=mois 42 year=annee 43 end 44 else: 16 function jourdsmois, mois, annee 17 18 case n_params() OF 19 0:return, daysinmonth() 20 1:return, daysinmonth(mois) 21 2:return, daysinmonth(mois, annee) 45 22 endcase 46 ;------------------------------------------------------------ 47 days_in_mth = [31,28+leapyr(year),31,30,31,30,31,31,30,31,30,31] 48 return, days_in_mth[month-1] 49 ;------------------------------------------------------------ 23 50 24 end
Note: See TracChangeset
for help on using the changeset viewer.