datetime_utils Module



Derived Types

type, public ::  gregorian_date

Components

Type Visibility Attributes Name Initial
integer, public :: iday
integer, public :: iyday
integer, public :: iyear
integer, public :: month

Functions

public pure function gregorian(julian)

This routine converts Julian day number to calendar (Gregorian) date.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: julian

Julian day (integer)

Return Value type(gregorian_date)

public pure function is_leap_year(year)

returns if a function is a Gregorian leap year

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: year

Return Value logical

public function julday(mm, id, iyyy)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: mm
integer, intent(in) :: id
integer, intent(in) :: iyyy

Return Value integer

public function modjulianday(year, month, day, fracday)

calculate the julian day from day, month, year and fraction of a day

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: year
integer, intent(in) :: month
integer, intent(in) :: day
real(kind=real64), intent(in) :: fracday

Return Value real(kind=real64)

public function seconds_of_year() result(total_seconds)

return how many seconds have passed since the year started

Arguments

None

Return Value integer


Subroutines

public subroutine caldate(jday, iyear, iyday)

This routine takes the modified Julian date and converts it to a date and time string.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: jday

modified Julian day (integer)

integer, intent(out) :: iyear

year (integer)

integer, intent(out) :: iyday

year day (integer)