source: trunk/CALENDRIER/jourdsmois.pro @ 2

Last change on this file since 2 was 2, checked in by opalod, 22 years ago

Initial revision

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.2 KB
Line 
1;------------------------------------------------------------
2;------------------------------------------------------------
3;------------------------------------------------------------
4;+
5; NAME:jourdsmois
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:
28;
29; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr)
30;                       2/7/98
31;-
32;------------------------------------------------------------
33;------------------------------------------------------------
34;------------------------------------------------------------
35function jourdsmois, mois,annee
36@common
37;------------------------------------------------------------
38case n_params() of
39  1:month=mois
40  2:begin
41      month=mois
42      year=annee
43    end
44  else:
45endcase
46;------------------------------------------------------------
47days_in_mth = [31,28+leapyr(year),31,30,31,30,31,31,30,31,30,31]
48return, days_in_mth[month-1]
49;------------------------------------------------------------
50end
Note: See TracBrowser for help on using the repository browser.