subroutine test_construct_ISO8601DateTime() type(ISO8601DateTime) :: isodatetime integer :: year = 2022 integer :: month = 07 integer :: day = 07 integer :: hour = 17 integer :: minute = 41 integer :: second = 07 integer :: millisecond = 513 integer :: timezone_offset = 0 character(len=*), parameter :: delimited = '2022-07-07T17:41:07.513Z' character(len=*), parameter :: undelimited = '20220707T174107.513Z' integer :: status isodatetime = construct_ISO8601DateTime(delimited, rc = status) @assertEqual(SUCCESS, status) @assertEqual(year, isodatetime%get_year()) @assertEqual(month, isodatetime%get_month()) @assertEqual(day, isodatetime%get_day()) @assertEqual(hour, isodatetime%get_hour()) @assertEqual(minute, isodatetime%get_minute()) @assertEqual(second, isodatetime%get_second()) @assertEqual(millisecond, isodatetime%get_millisecond()) @assertEqual(timezone_offset, isodatetime%get_timezone_offset()) isodatetime = construct_ISO8601DateTime(undelimited, rc = status) @assertEqual(SUCCESS, status) @assertEqual(year, isodatetime%get_year()) @assertEqual(month, isodatetime%get_month()) @assertEqual(day, isodatetime%get_day()) @assertEqual(hour, isodatetime%get_hour()) @assertEqual(minute, isodatetime%get_minute()) @assertEqual(second, isodatetime%get_second()) @assertEqual(millisecond, isodatetime%get_millisecond()) @assertEqual(timezone_offset, isodatetime%get_timezone_offset()) end subroutine test_construct_ISO8601DateTime