tomlf_datetime Module

Implementation of a TOML datetime value



Interfaces

public interface operator(==)

  • private pure function compare_datetime(lhs, rhs) result(match)

    Arguments

    Type IntentOptional Attributes Name
    type(toml_datetime), intent(in) :: lhs
    type(toml_datetime), intent(in) :: rhs

    Return Value logical

public interface to_string

  • private pure function to_string_datetime(datetime) result(str)

    Arguments

    Type IntentOptional Attributes Name
    type(toml_datetime), intent(in) :: datetime

    Return Value character(kind=tfc, len=:), allocatable

public interface toml_datetime

Create a new TOML datetime value

  • private pure function new_datetime(year, month, day, hour, minute, second, msecond, zone) result(datetime)

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in), optional :: year
    integer, intent(in), optional :: month
    integer, intent(in), optional :: day
    integer, intent(in), optional :: hour
    integer, intent(in), optional :: minute
    integer, intent(in), optional :: second
    integer, intent(in), optional :: msecond
    character(len=*), intent(in), optional :: zone

    Return Value type(toml_datetime)

  • private pure function new_datetime_from_string(string) result(datetime)

    Arguments

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

    Return Value type(toml_datetime)

public interface toml_time

  • private elemental function new_toml_time(hour, minute, second, msec, zone) result(self)

    Constructor for toml_time type, necessary due to PGI bug in NVHPC 20.7 and 20.9

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in), optional :: hour
    integer, intent(in), optional :: minute
    integer, intent(in), optional :: second
    integer, intent(in), optional :: msec
    character(len=*), intent(in), optional :: zone

    Return Value type(toml_time)


Derived Types

type, public ::  toml_date

TOML date value (YYYY-MM-DD)

Components

Type Visibility Attributes Name Initial
integer, public :: day = -1
integer, public :: month = -1
integer, public :: year = -1

type, public ::  toml_datetime

TOML datatime value type

Components

Type Visibility Attributes Name Initial
type(toml_date), public :: date
type(toml_time), public :: time

Constructor

Create a new TOML datetime value

private pure function new_datetime (year, month, day, hour, minute, second, msecond, zone)
private pure function new_datetime_from_string (string)

type, public ::  toml_time

TOML time value (HH:MM:SS.sssssZ…)

Components

Type Visibility Attributes Name Initial
integer, public :: hour = -1
integer, public :: minute = -1
integer, public :: msec = -1
integer, public :: second = -1
character(len=:), public, allocatable :: zone

Constructor

private elemental function new_toml_time (hour, minute, second, msec, zone)

Constructor for toml_time type, necessary due to PGI bug in NVHPC 20.7 and 20.9


Functions

public pure function has_date(datetime)

Arguments

Type IntentOptional Attributes Name
class(toml_datetime), intent(in) :: datetime

Return Value logical

public pure function has_time(datetime)

Arguments

Type IntentOptional Attributes Name
class(toml_datetime), intent(in) :: datetime

Return Value logical