1 |
C $Header: /u/gcmpack/development/heimbach/ecco_env/pkg/cal/cal_weekday.F,v 1.4 2001/02/02 16:57:23 heimbach Exp $ |
2 |
|
3 |
#include "CAL_CPPOPTIONS.h" |
4 |
|
5 |
subroutine cal_WeekDay( |
6 |
I indate, |
7 |
O daystring, |
8 |
I mythid |
9 |
& ) |
10 |
|
11 |
c ================================================================== |
12 |
c SUBROUTINE cal_WeekDay |
13 |
c ================================================================== |
14 |
c |
15 |
c o Given a calendar date return the weekday as a string. |
16 |
c |
17 |
c started: Christian Eckert eckert@mit.edu 19-Jan-1999 |
18 |
c |
19 |
c changed: Christian Eckert eckert@mit.edu 03-Feb-2000 |
20 |
c |
21 |
c - Introduced new routine and function names, cal_<NAME>, |
22 |
c for verion 0.1.3. |
23 |
c |
24 |
c ================================================================== |
25 |
c SUBROUTINE cal_WeekDay |
26 |
c ================================================================== |
27 |
|
28 |
implicit none |
29 |
|
30 |
c == global variables == |
31 |
|
32 |
#include "cal.h" |
33 |
|
34 |
c == routine arguments == |
35 |
|
36 |
integer indate(4) |
37 |
character*(3) daystring |
38 |
integer mythid |
39 |
|
40 |
c == local variables == |
41 |
|
42 |
integer nweekday |
43 |
integer numberofdays(4) |
44 |
|
45 |
c == end of interface == |
46 |
|
47 |
c Determine the day of the week. |
48 |
call cal_TimePassed( refdate, indate, numberofdays, mythid ) |
49 |
nweekday = mod(numberofdays(1),7)+1 |
50 |
|
51 |
daystring = dayofweek(nweekday) |
52 |
|
53 |
return |
54 |
end |
55 |
|