MAPL_ISO8601_DateTime Module


Uses

  • module~~mapl_iso8601_datetime~~UsesGraph module~mapl_iso8601_datetime MAPL_ISO8601_DateTime module~mapl_exceptionhandling MAPL_ExceptionHandling module~mapl_iso8601_datetime->module~mapl_exceptionhandling module~mapl_keywordenforcermod MAPL_KeywordEnforcerMod module~mapl_iso8601_datetime->module~mapl_keywordenforcermod module~mapl_errorhandlingmod MAPL_ErrorHandlingMod module~mapl_exceptionhandling->module~mapl_errorhandlingmod module~mapl_throwmod MAPL_ThrowMod module~mapl_exceptionhandling->module~mapl_throwmod module~mapl_errorhandlingmod->module~mapl_throwmod mpi mpi module~mapl_errorhandlingmod->mpi

Used by

  • module~~mapl_iso8601_datetime~~UsedByGraph module~mapl_iso8601_datetime MAPL_ISO8601_DateTime module~mapl_iso8601_datetime_esmf MAPL_ISO8601_DateTime_ESMF module~mapl_iso8601_datetime_esmf->module~mapl_iso8601_datetime module~test_mapl_iso8601_datetime test_MAPL_ISO8601_DateTime module~test_mapl_iso8601_datetime->module~mapl_iso8601_datetime

Variables

Type Visibility Attributes Name Initial
character(len=1), public, parameter :: TIME_PREFIX = 'T'
character(len=10), public, parameter :: DIGIT_CHARACTERS = '0123456789'
integer, public, parameter :: ID_DAY = 1
integer, public, parameter :: ID_MONTH = ID_WIDTH*ID_DAY
integer, public, parameter :: ID_WIDTH = 100
integer, public, parameter :: ID_YEAR = ID_WIDTH*ID_MONTH
integer, public, parameter :: INVALID = -1
integer, public, parameter :: IT_HOUR = IT_WIDTH*IT_MINUTE
integer, public, parameter :: IT_MINUTE = IT_WIDTH*IT_SECOND
integer, public, parameter :: IT_SECOND = 1
integer, public, parameter :: IT_WIDTH = ID_WIDTH
integer, public, parameter :: MINUTES_PER_HOUR = 60
integer, public, parameter :: NUM_DATE_FIELDS = 3
integer, public, parameter :: NUM_TIME_FIELDS = 5
integer, public, parameter :: Z = 0

Interfaces

public interface ISO8601Date

  • public function construct_ISO8601Date(isostring, rc) result(date)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: isostring
    integer, intent(out) :: rc

    Return Value type(ISO8601Date)

public interface ISO8601DateTime

  • public function construct_ISO8601DateTime(isostring, rc) result(datetime)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: isostring
    integer, intent(inout), optional :: rc

    Return Value type(ISO8601DateTime)

public interface ISO8601Duration

  • public function construct_ISO8601Duration(isostring, imin, imax, rc) result(duration)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: isostring
    integer, intent(in) :: imin
    integer, intent(in) :: imax
    integer, intent(out), optional :: rc

    Return Value type(ISO8601Duration)

public interface ISO8601Time

  • public function construct_ISO8601Time(isostring, rc) result(time)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: isostring
    integer, intent(inout) :: rc

    Return Value type(ISO8601Time)

public interface date_fields

  • public function construct_date_fields(year, month, day) result(fields)

    Arguments

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

    Return Value type(date_fields)

public interface operator(.divides.)

  • public pure function divides(factor, dividend)

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: factor
    integer, intent(in) :: dividend

    Return Value logical

public interface time_fields

  • public pure function construct_time_fields(hour, minute, second, millisecond, timezone_offset) result(fields)

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: hour
    integer, intent(in) :: minute
    integer, intent(in) :: second
    integer, intent(in) :: millisecond
    integer, intent(in) :: timezone_offset

    Return Value type(time_fields)


Derived Types

type, public ::  ISO8601Date

Constructor

public function construct_ISO8601Date (isostring, rc)

Type-Bound Procedures

procedure, public :: get_day
procedure, public :: get_month
procedure, public :: get_year

type, public ::  ISO8601DateTime

Constructor

public function construct_ISO8601DateTime (isostring, rc)

Type-Bound Procedures

procedure, public :: get_date
procedure, public :: get_day => get_day_datetime
procedure, public :: get_hour => get_hour_datetime
procedure, public :: get_millisecond => get_millisecond_datetime
procedure, public :: get_minute => get_minute_datetime
procedure, public :: get_month => get_month_datetime
procedure, public :: get_second => get_second_datetime
procedure, public :: get_time
procedure, public :: get_timezone_offset => get_timezone_offset_datetime
procedure, public :: get_year => get_year_datetime

type, public ::  ISO8601Duration

Constructor

public function construct_ISO8601Duration (isostring, imin, imax, rc)

Type-Bound Procedures

procedure, public :: get_days
procedure, public :: get_hours
procedure, public :: get_minutes
procedure, public :: get_months
procedure, public :: get_seconds
procedure, public :: get_years

type, public ::  ISO8601Interval

Type-Bound Procedures

procedure, public :: get_end_datetime
procedure, public :: get_repetitions
procedure, public :: get_start_datetime

type, public ::  ISO8601Time

Constructor

public function construct_ISO8601Time (isostring, rc)

Type-Bound Procedures

procedure, public :: get_hour
procedure, public :: get_millisecond
procedure, public :: get_minute
procedure, public :: get_second
procedure, public :: get_timezone_offset

type, public ::  date_fields

Components

Type Visibility Attributes Name Initial
integer, public :: day_
integer, public :: month_
integer, public :: year_
logical, public :: is_valid_ = .FALSE.

Constructor

public function construct_date_fields (year, month, day)

type, public ::  time_fields

Components

Type Visibility Attributes Name Initial
integer, public :: hour_
integer, public :: millisecond_
integer, public :: minute_
integer, public :: second_
integer, public :: timezone_offset_
logical, public :: is_valid_ = .FALSE.

Constructor

public pure function construct_time_fields (hour, minute, second, millisecond, timezone_offset)

Functions

public pure function undelimit(string, delimiter) result(undelimited)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: string
character(len=1), intent(in) :: delimiter

Return Value character(len=len)

public function convert_ISO8601_to_integer_date(isostring, rc) result(integer_date)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: isostring
integer, intent(out), optional :: rc

Return Value integer

public function convert_ISO8601_to_integer_time(isostring, rc) result(integer_time)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: isostring
integer, intent(out), optional :: rc

Return Value integer

public function get_day(self)

Arguments

Type IntentOptional Attributes Name
class(ISO8601Date), intent(in) :: self

Return Value integer

public function get_day_datetime(self)

Arguments

Type IntentOptional Attributes Name
class(ISO8601DateTime), intent(in) :: self

Return Value integer

public function get_days(self)

Arguments

Type IntentOptional Attributes Name
class(ISO8601Duration), intent(in) :: self

Return Value integer

public function get_hour(self)

Arguments

Type IntentOptional Attributes Name
class(ISO8601Time), intent(in) :: self

Return Value integer

public function get_hour_datetime(self)

Arguments

Type IntentOptional Attributes Name
class(ISO8601DateTime), intent(in) :: self

Return Value integer

public function get_hours(self)

Arguments

Type IntentOptional Attributes Name
class(ISO8601Duration), intent(in) :: self

Return Value integer

public pure function get_integer_digit(c)

Arguments

Type IntentOptional Attributes Name
character(len=1), intent(in) :: c

Return Value integer

public pure function get_integer_digit_from_string(s, i)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: s
integer, intent(in) :: i

Return Value integer

public function get_millisecond(self)

Arguments

Type IntentOptional Attributes Name
class(ISO8601Time), intent(in) :: self

Return Value integer

public function get_millisecond_datetime(self)

Arguments

Type IntentOptional Attributes Name
class(ISO8601DateTime), intent(in) :: self

Return Value integer

public function get_minute(self)

Arguments

Type IntentOptional Attributes Name
class(ISO8601Time), intent(in) :: self

Return Value integer

public function get_minute_datetime(self)

Arguments

Type IntentOptional Attributes Name
class(ISO8601DateTime), intent(in) :: self

Return Value integer

public function get_minutes(self)

Arguments

Type IntentOptional Attributes Name
class(ISO8601Duration), intent(in) :: self

Return Value integer

public function get_month(self)

Arguments

Type IntentOptional Attributes Name
class(ISO8601Date), intent(in) :: self

Return Value integer

public function get_month_datetime(self)

Arguments

Type IntentOptional Attributes Name
class(ISO8601DateTime), intent(in) :: self

Return Value integer

public pure function get_month_end(y, m)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: y
integer, intent(in) :: m

Return Value integer

public pure function get_month_ends(y) result(month_ends)

Arguments

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

Return Value integer, dimension(NUM_MONTHS)

public function get_months(self)

Arguments

Type IntentOptional Attributes Name
class(ISO8601Duration), intent(in) :: self

Return Value integer

public function get_repetitions(self)

Arguments

Type IntentOptional Attributes Name
class(ISO8601Interval), intent(in) :: self

Return Value integer

public function get_second(self)

Arguments

Type IntentOptional Attributes Name
class(ISO8601Time), intent(in) :: self

Return Value integer

public function get_second_datetime(self)

Arguments

Type IntentOptional Attributes Name
class(ISO8601DateTime), intent(in) :: self

Return Value integer

public function get_seconds(self)

Arguments

Type IntentOptional Attributes Name
class(ISO8601Duration), intent(in) :: self

Return Value integer

public function get_timezone_offset(self)

Arguments

Type IntentOptional Attributes Name
class(ISO8601Time), intent(in) :: self

Return Value integer

public function get_timezone_offset_datetime(self)

Arguments

Type IntentOptional Attributes Name
class(ISO8601DateTime), intent(in) :: self

Return Value integer

public function get_year(self)

Arguments

Type IntentOptional Attributes Name
class(ISO8601Date), intent(in) :: self

Return Value integer

public function get_year_datetime(self)

Arguments

Type IntentOptional Attributes Name
class(ISO8601DateTime), intent(in) :: self

Return Value integer

public function get_years(self)

Arguments

Type IntentOptional Attributes Name
class(ISO8601Duration), intent(in) :: self

Return Value integer

public pure function parse_timezone_offset(offset, field_width) result(tzo)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: offset
integer, intent(in) :: field_width

Return Value integer

public pure function read_whole_number(string)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: string

Return Value integer

public pure function read_whole_number_indexed(string, istart, istop)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: string
integer, intent(in) :: istart
integer, intent(in) :: istop

Return Value integer

public pure function divides(factor, dividend)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: factor
integer, intent(in) :: dividend

Return Value logical

public pure function is_between(lower, upper, n)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: lower
integer, intent(in) :: upper
integer, intent(in) :: n

Return Value logical

public pure elemental function is_digit(c)

Arguments

Type IntentOptional Attributes Name
character(len=1), intent(in) :: c

Return Value logical

public pure function is_leap_year(y)

Arguments

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

Return Value logical

public pure function is_valid_date(date)

Arguments

Type IntentOptional Attributes Name
type(date_fields), intent(in) :: date

Return Value logical

public pure function is_valid_hour(hour)

Arguments

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

Return Value logical

public pure function is_valid_millisecond(millisecond)

Arguments

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

Return Value logical

public pure function is_valid_minute(minute)

Arguments

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

Return Value logical

public pure function is_valid_month(m)

Arguments

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

Return Value logical

public pure function is_valid_second(second)

Arguments

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

Return Value logical

public pure function is_valid_time(time)

Arguments

Type IntentOptional Attributes Name
type(time_fields), intent(in) :: time

Return Value logical

public pure function is_valid_timezone_offset(timezone_offset)

Arguments

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

Return Value logical

public pure function is_valid_year(y)

Arguments

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

Return Value logical

public pure function is_whole_number(n)

Arguments

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

Return Value logical

public function construct_ISO8601Date(isostring, rc) result(date)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: isostring
integer, intent(out) :: rc

Return Value type(ISO8601Date)

public function get_date(self) result(date)

Arguments

Type IntentOptional Attributes Name
class(ISO8601DateTime), intent(in) :: self

Return Value type(ISO8601Date)

public function construct_ISO8601DateTime(isostring, rc) result(datetime)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: isostring
integer, intent(inout), optional :: rc

Return Value type(ISO8601DateTime)

public function get_end_datetime(self) result(datetime)

Arguments

Type IntentOptional Attributes Name
class(ISO8601Interval), intent(in) :: self

Return Value type(ISO8601DateTime)

public function get_start_datetime(self) result(datetime)

Arguments

Type IntentOptional Attributes Name
class(ISO8601Interval), intent(in) :: self

Return Value type(ISO8601DateTime)

public function construct_ISO8601Duration(isostring, imin, imax, rc) result(duration)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: isostring
integer, intent(in) :: imin
integer, intent(in) :: imax
integer, intent(out), optional :: rc

Return Value type(ISO8601Duration)

public function construct_ISO8601Time(isostring, rc) result(time)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: isostring
integer, intent(inout) :: rc

Return Value type(ISO8601Time)

public function get_time(self) result(time)

Arguments

Type IntentOptional Attributes Name
class(ISO8601DateTime), intent(in) :: self

Return Value type(ISO8601Time)

public function construct_date_fields(year, month, day) result(fields)

Arguments

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

Return Value type(date_fields)

public pure function parse_date(datestring) result(fields)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: datestring

Return Value type(date_fields)

public pure function construct_time_fields(hour, minute, second, millisecond, timezone_offset) result(fields)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: hour
integer, intent(in) :: minute
integer, intent(in) :: second
integer, intent(in) :: millisecond
integer, intent(in) :: timezone_offset

Return Value type(time_fields)

public pure function parse_time(timestring) result(fields)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: timestring

Return Value type(time_fields)