42 '$Id: Date_Utility.f90 60152 2015-08-13 19:19:13Z paul.vandelst@noaa.gov $' 44 INTEGER,
PARAMETER ::
nl = 20
49 (/ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 /)
52 (/
'January ',
'February ',
'March ',
'April ',
'May ',
'June ', &
53 'July ',
'August ',
'September',
'October ',
'November ',
'December ' /)
58 (/
'Sunday ',
'Monday ',
'Tuesday ',
'Wednesday',
'Thursday ',
'Friday ',
'Saturday '/)
103 INTEGER,
INTENT(IN) :: year
106 isleapyear = ( (mod(year,4) == 0) .AND. (mod(year,100) /= 0) ) .OR. &
159 INTEGER,
INTENT(IN) :: day
160 INTEGER,
INTENT(IN) :: month
161 INTEGER,
INTENT(IN) :: year
165 INTEGER :: days_per_month(
n_months )
175 IF (
isleapyear(year) ) days_per_month(2) = 29
176 IF ( day > days_per_month(month) )
RETURN 179 doy = sum(days_per_month(1:month-1)) + day
218 ELEMENTAL FUNCTION daysinmonth(Month, Year)
RESULT(n_Days)
220 INTEGER,
INTENT(IN) :: month
221 INTEGER,
INTENT(IN) :: year
236 IF (
isleapyear(year=year) ) days_per_month(2) = 29
239 n_days = days_per_month(month)
273 INTEGER,
INTENT(IN) :: month
276 IF ( month < 1 .OR. month >
n_months )
RETURN 329 ELEMENTAL FUNCTION dayofweek( Day, Month, Year )
330 INTEGER,
INTENT(IN) :: day
331 INTEGER,
INTENT(IN) :: month
332 INTEGER,
INTENT(IN) :: year
398 ELEMENTAL FUNCTION idayofweek( Day, Month, Year )
RESULT( iDoW )
400 INTEGER,
INTENT(IN) :: day
401 INTEGER,
INTENT(IN) :: month
402 INTEGER,
INTENT(IN) :: year
410 IF ( jdn < 0 )
RETURN 412 idow = mod(jdn+1, 7) + 1
413 IF ( idow < 1 .OR. idow > 7 ) idow = 0
469 ELEMENTAL FUNCTION julianday( Day, Month, Year )
RESULT( jdn )
471 INTEGER,
INTENT(IN) :: day
472 INTEGER,
INTENT(IN) :: month
473 INTEGER,
INTENT(IN) :: year
480 IF ( year <= 1918 )
RETURN 485 m = month + (12*a) - 3
490 (y/4) - (y/100) + (y/400) - &
elemental logical function, public isleapyear(Year)
character(*), dimension(n_days), parameter, public day_name
integer, parameter, public n_days
integer, dimension(n_months), parameter, public days_per_month_in_nonleap
elemental character(nl) function, public dayofweek(Day, Month, Year)
integer, parameter, public n_months
elemental integer function, public dayofyear(Day, Month, Year)
elemental integer function julianday(Day, Month, Year)
elemental character(nl) function, public nameofmonth(Month)
elemental integer function, public daysinmonth(Month, Year)
character(*), parameter module_version_id
character(*), dimension(n_months), parameter, public month_name
elemental integer function idayofweek(Day, Month, Year)