15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
47 implicit none
48 logical:: result
49
50
51
52 real(DP), intent(in):: elapse_sec
53
54
55 type(DC_CAL_DATE), intent(in), optional, target:: date
56
57
58
59
60 type(DC_CAL), intent(in), optional, target:: cal
61
62
63
64
65
66
67
68 type(DC_CAL_DATE), pointer:: datep =>null()
69 type(DC_CAL), pointer:: calp =>null()
70 integer:: year, month, day, hour, min
71 real(DP):: sec
72continue
73
74
75
76
77 if ( present( date ) ) then
78 datep => date
79 else
81 end if
82
83 if ( present( cal ) ) then
84 calp => cal
85 else
88 end if
89
90
91
92
93 result = .false.
94 if ( .not. datep % initialized ) return
95 if ( .not. calp % initialized ) return
96
97
98
99
101 & elapse_sec = elapse_sec, date = datep , cal = calp )
102
103
104
105
106 select case( calp % cal_type )
108 if ( mod( year, 4 ) == 0 ) then
109 result = .true.
110 else
111 result = .false.
112 end if
113
115 if ( mod( year, 400 ) == 0 ) then
116 result = .true.
117 elseif ( mod( year, 100 ) == 0 ) then
118 result = .false.
119 elseif ( mod( year, 4 ) == 0 ) then
120 result = .true.
121 else
122 result = .false.
123 end if
124
125 case default
126 result = .false.
127 end select
128
type(dc_cal), target, save, public default_cal
type(dc_cal_date), target, save, public default_date
integer function, public dccaldate_normalize(year, month, day, hour, min, sec, cal)
integer function, public dccaldate_ym2d(year, month, day, cal, day_of_year)
subroutine, public default_cal_set
integer, parameter, public cal_user_defined
integer, parameter, public cal_julian
integer, parameter, public cal_gregorian
integer, parameter, public cal_360day
integer, parameter, public cal_noleap
integer, parameter, public cal_cyclic
integer, parameter, public dp
倍精度実数型変数