19 use,
INTRINSIC :: iso_c_binding, only: c_char, c_int
29 TYPE,
BIND(c) :: tm_struct
35 INTEGER(kind=C_INT) :: tm_sec
36 INTEGER(kind=C_INT) :: tm_min
37 INTEGER(kind=C_INT) :: tm_hour
38 INTEGER(kind=C_INT) :: tm_mday
39 INTEGER(kind=C_INT) :: tm_mon
40 INTEGER(kind=C_INT) :: tm_year
41 INTEGER(kind=C_INT) :: tm_wday
42 INTEGER(kind=C_INT) :: tm_yday
43 INTEGER(kind=C_INT) :: tm_isdst
54 bind(c, name=
'strftime') result(rc)
60 IMPORT :: c_char, c_int
66 CHARACTER(kind=C_CHAR),
DIMENSION(*),
INTENT(out) :: str
67 INTEGER(kind=C_INT),
VALUE,
INTENT(in) :: slen
68 CHARACTER(kind=C_CHAR),
DIMENSION(*),
INTENT(in) :: format
70 INTEGER(kind=C_INT) :: rc
74 FUNCTION c_strptime(str, FORMAT, tm) bind(c, name='strptime')
RESULT(rc)
80 IMPORT :: c_char, c_int
86 CHARACTER(kind=C_CHAR),
DIMENSION(*),
INTENT(in) :: str
87 CHARACTER(kind=C_CHAR),
DIMENSION(*),
INTENT(in) :: format
89 INTEGER(kind=C_INT) :: rc
111 use,
INTRINSIC :: iso_fortran_env, only: real32, real64
117 PUBLIC ::
zero,
one,
d2h,
h2d,
d2m,
m2d,
m2h,
s2d,
d2s,
h2s,
s2h,
m2s,
s2m,
maxstrlen
119 REAL(kind=real64),
PARAMETER ::
zero = 0_real64
120 REAL(kind=real64),
PARAMETER ::
one = 1_real64
124 REAL(kind=real64),
PARAMETER ::
d2h = 24_real64
126 REAL(kind=real64),
PARAMETER ::
d2m =
d2h*60_real64
128 REAL(kind=real64),
PARAMETER ::
m2h =
one/60_real64
129 REAL(kind=real64),
PARAMETER ::
s2d =
m2d/60_real64
130 REAL(kind=real64),
PARAMETER ::
d2s = 86400_real64
131 REAL(kind=real64),
PARAMETER ::
h2s = 3600_real64
133 REAL(kind=real64),
PARAMETER ::
m2s = 60_real64
158 use,
INTRINSIC :: iso_fortran_env, only: real32, real64
175 INTEGER :: minutes = 0
176 INTEGER :: seconds = 0
177 INTEGER :: milliseconds = 0
195 PROCEDURE,
PRIVATE ::
eq
197 PROCEDURE,
PRIVATE ::
gt
198 PROCEDURE,
PRIVATE ::
ge
199 PROCEDURE,
PRIVATE ::
lt
200 PROCEDURE,
PRIVATE ::
le
205 generic ::
OPERATOR(==) =>
eq
206 generic ::
OPERATOR(/=) =>
neq
207 generic ::
OPERATOR(>) =>
gt
208 generic ::
OPERATOR(>=) =>
ge
209 generic ::
OPERATOR(<) =>
lt
210 generic ::
OPERATOR(<=) =>
le
222 hours, minutes, seconds, milliseconds)
226 INTEGER,
INTENT(in),
OPTIONAL :: days
227 INTEGER,
INTENT(in),
OPTIONAL :: hours
228 INTEGER,
INTENT(in),
OPTIONAL :: minutes
229 INTEGER,
INTENT(in),
OPTIONAL :: seconds
230 INTEGER,
INTENT(in),
OPTIONAL :: milliseconds
232 IF (
PRESENT(days))
THEN
238 IF (
PRESENT(hours))
THEN
244 IF (
PRESENT(minutes))
THEN
250 IF (
PRESENT(seconds))
THEN
256 IF (
PRESENT(milliseconds))
THEN
305 + self%hours*3600._real64 &
306 + self%minutes*60._real64 &
308 + self%milliseconds*1e-3_real64
322 hours=t0%hours + t1%hours, &
323 minutes=t0%minutes + t1%minutes, &
324 seconds=t0%seconds + t1%seconds, &
325 milliseconds=t0%milliseconds + t1%milliseconds)
352 t%minutes = -t0%minutes
353 t%seconds = -t0%seconds
354 t%milliseconds = -t0%milliseconds
358 PURE ELEMENTAL LOGICAL FUNCTION eq(td0, td1)
367 eq = td0%total_seconds() == td1%total_seconds()
371 PURE ELEMENTAL LOGICAL FUNCTION neq(td0, td1)
380 neq = .NOT. (td0%total_seconds() == td1%total_seconds())
384 PURE ELEMENTAL LOGICAL FUNCTION gt(td0, td1)
393 gt = td0%total_seconds() > td1%total_seconds()
397 PURE ELEMENTAL LOGICAL FUNCTION ge(td0, td1)
406 ge = td0%total_seconds() >= td1%total_seconds()
410 PURE ELEMENTAL LOGICAL FUNCTION lt(td0, td1)
419 lt = td0%total_seconds() < td1%total_seconds()
423 PURE ELEMENTAL LOGICAL FUNCTION le(td0, td1)
432 le = td0%total_seconds() <= td1%total_seconds()
455 use,
INTRINSIC :: iso_fortran_env, only: real32, real64
456 use,
INTRINSIC :: iso_c_binding, only: c_char, c_int, c_null_char
485 INTEGER :: minute = 0
486 INTEGER :: second = 0
487 INTEGER :: millisecond = 0
489 REAL(kind=real64) :: tz = 0
501 PROCEDURE, pass(self),
PUBLIC ::
gettz
507 PROCEDURE,
NOPASS,
PUBLIC ::
now
510 PROCEDURE, pass(self),
PUBLIC ::
tm
512 PROCEDURE, pass(self),
PUBLIC ::
utc
533 PROCEDURE, pass(d0),
PRIVATE ::
eq
534 PROCEDURE, pass(d0),
PRIVATE ::
neq
535 PROCEDURE, pass(d0),
PRIVATE ::
gt
536 PROCEDURE, pass(d0),
PRIVATE ::
ge
537 PROCEDURE, pass(d0),
PRIVATE ::
lt
538 PROCEDURE, pass(d0),
PRIVATE ::
le
544 generic ::
OPERATOR(==) =>
eq
545 generic ::
OPERATOR(/=) =>
neq
546 generic ::
OPERATOR(>) =>
gt
547 generic ::
OPERATOR(>=) =>
ge
548 generic ::
OPERATOR(<) =>
lt
549 generic ::
OPERATOR(<=) =>
le
561 day, hour, minute, second, millisecond, tz)
565 INTEGER,
INTENT(in),
OPTIONAL :: year
566 INTEGER,
INTENT(in),
OPTIONAL :: month
567 INTEGER,
INTENT(in),
OPTIONAL :: day
568 INTEGER,
INTENT(in),
OPTIONAL :: hour
569 INTEGER,
INTENT(in),
OPTIONAL :: minute
570 INTEGER,
INTENT(in),
OPTIONAL :: second
571 INTEGER,
INTENT(in),
OPTIONAL :: millisecond
572 REAL(kind=real64),
INTENT(in),
OPTIONAL :: tz
574 IF (
PRESENT(year))
THEN
580 IF (
PRESENT(month))
THEN
586 IF (
PRESENT(day))
THEN
592 IF (
PRESENT(hour))
THEN
598 IF (
PRESENT(minute))
THEN
604 IF (
PRESENT(second))
THEN
610 IF (
PRESENT(millisecond))
THEN
616 IF (
PRESENT(tz))
THEN
639 PURE ELEMENTAL INTEGER FUNCTION getday(self)
669 PURE ELEMENTAL REAL(kind=REAL64) FUNCTION gettz(self)
680 CLASS(
datetime),
INTENT(inout) :: self
681 INTEGER,
INTENT(in) :: ms
683 self%millisecond = self%millisecond + ms
686 IF (self%millisecond >= 1000)
THEN
687 CALL self%addSeconds(self%millisecond/1000)
688 self%millisecond = mod(self%millisecond, 1000)
689 ELSEIF (self%millisecond < 0)
THEN
690 CALL self%addSeconds(self%millisecond/1000 - 1)
691 self%millisecond = mod(self%millisecond, 1000) + 1000
707 CLASS(
datetime),
INTENT(inout) :: self
708 INTEGER,
INTENT(in) :: s
710 self%second = self%second + s
713 IF (self%second >= 60)
THEN
714 CALL self%addMinutes(self%second/60)
715 self%second = mod(self%second, 60)
716 ELSEIF (self%second < 0)
THEN
717 CALL self%addMinutes(self%second/60 - 1)
718 self%second = mod(self%second, 60) + 60
731 CLASS(
datetime),
INTENT(inout) :: self
732 INTEGER,
INTENT(in) :: m
734 self%minute = self%minute + m
737 IF (self%minute >= 60)
THEN
738 CALL self%addHours(self%minute/60)
739 self%minute = mod(self%minute, 60)
740 ELSEIF (self%minute < 0)
THEN
741 CALL self%addHours(self%minute/60 - 1)
742 self%minute = mod(self%minute, 60) + 60
755 CLASS(
datetime),
INTENT(inout) :: self
756 INTEGER,
INTENT(in) :: h
758 self%hour = self%hour + h
761 IF (self%hour >= 24)
THEN
762 CALL self%addDays(self%hour/24)
763 self%hour = mod(self%hour, 24)
764 ELSEIF (self%hour < 0)
THEN
765 CALL self%addDays(self%hour/24 - 1)
766 self%hour = mod(self%hour, 24) + 24
779 CLASS(
datetime),
INTENT(inout) :: self
780 INTEGER,
INTENT(in) :: d
782 INTEGER :: daysincurrentmonth
784 self%day = self%day + d
786 daysincurrentmonth =
daysinmonth(self%month, self%year)
787 IF (self%day > daysincurrentmonth)
THEN
788 self%day = self%day - daysincurrentmonth
789 self%month = self%month + 1
790 IF (self%month > 12)
THEN
791 self%year = self%year + self%month/12
792 self%month = mod(self%month, 12)
794 ELSEIF (self%day < 1)
THEN
795 self%month = self%month - 1
796 IF (self%month < 1)
THEN
797 self%year = self%year + self%month/12 - 1
798 self%month = 12 + mod(self%month, 12)
800 self%day = self%day +
daysinmonth(self%month, self%year)
808 PURE ELEMENTAL CHARACTER(len=23) FUNCTION isoformat(self, sep)
813 CHARACTER(len=1),
INTENT(in),
OPTIONAL :: sep
816 CHARACTER(len=1) :: separator
818 IF (
PRESENT(sep))
THEN
831 int2str(self%month, 2)//
'-'// &
832 int2str(self%day, 2)//separator// &
834 int2str(self%minute, 2)//
':'// &
835 int2str(self%second, 2)//
'.'// &
851 IF (self%year < 1)
THEN
856 IF (self%month < 1 .OR. self%month > 12)
THEN
861 IF (self%day < 1 .OR. &
862 self%day >
daysinmonth(self%month, self%year))
THEN
867 IF (self%hour < 0 .OR. self%hour > 23)
THEN
872 IF (self%minute < 0 .OR. self%minute > 59)
THEN
877 IF (self%second < 0 .OR. self%second > 59)
THEN
882 IF (self%millisecond < 0 .OR. self%millisecond > 999)
THEN
894 CHARACTER(len=5) :: zone
895 INTEGER,
DIMENSION(8) :: values
897 INTEGER :: hour, minute
900 CALL date_and_time(zone=zone, values=values)
902 READ (unit=zone(1:3), fmt=
'(I3)') hour
903 READ (unit=zone(4:5), fmt=
'(I2)') minute
911 millisecond=values(8))
913 now%tz = hour + minute*m2h
932 INTEGER :: year, month
946 weekday = mod(self%day + ((month + 1)*26)/10 + k + k/4 + j/4 + 5*j, 7) - 1
981 CHARACTER(len=9),
PARAMETER,
DIMENSION(7) :: &
982 days = [
'Sunday ',
'Monday ',
'Tuesday ',
'Wednesday', &
983 'Thursday ',
'Friday ',
'Saturday ']
996 CHARACTER(len=9),
PARAMETER,
DIMENSION(7) :: &
997 days = [
'Monday ',
'Tuesday ',
'Wednesday',
'Thursday ', &
998 'Friday ',
'Saturday ',
'Sunday ']
1008 CLASS(
datetime),
INTENT(in) :: self
1010 CHARACTER(len=3),
PARAMETER,
DIMENSION(7) :: &
1011 days = [
'Sun',
'Mon',
'Tue',
'Wed',
'Thu',
'Fri',
'Sat']
1022 CLASS(
datetime),
INTENT(in) :: self
1024 CHARACTER(len=3),
PARAMETER,
DIMENSION(7) :: &
1025 days = [
'Mon',
'Tue',
'Wed',
'Thu',
'Fri',
'Sat',
'Sun']
1037 CLASS(
datetime),
INTENT(in) :: self
1040 INTEGER :: year, week, wday
1042 CHARACTER(len=20) :: string
1044 rc = c_strftime(string, len(string),
'%G %V %u'//c_null_char, &
1047 READ (unit=string(1:4), fmt=
'(I4)') year
1048 READ (unit=string(6:7), fmt=
'(I2)') week
1049 READ (unit=string(9:9), fmt=
'(I1)') wday
1062 CLASS(
datetime),
INTENT(in) :: self
1064 CHARACTER(len=11) :: string
1066 string = self%strftime(
'%s')
1075 CLASS(
datetime),
INTENT(in) :: self
1076 CHARACTER(len=*),
INTENT(in) :: format
1078 CHARACTER(len=:),
ALLOCATABLE ::
strftime
1081 CHARACTER(len=MAXSTRLEN) :: resultstring
1084 rc = c_strftime(resultstring, maxstrlen, trim(format)//c_null_char, &
1092 PURE ELEMENTAL TYPE(tm_struct) function
tm(self)
1096 CLASS(
datetime),
INTENT(in) :: self
1098 tm%tm_sec = self%second
1099 tm%tm_min = self%minute
1100 tm%tm_hour = self%hour
1101 tm%tm_mday = self%day
1102 tm%tm_mon = self%month - 1
1103 tm%tm_year = self%year - 1900
1104 tm%tm_wday = self%weekday()
1105 tm%tm_yday = self%yearday() - 1
1110 PURE ELEMENTAL CHARACTER(len=5) FUNCTION tzoffset(self)
1115 CLASS(
datetime),
INTENT(in) :: self
1117 INTEGER :: hours, minutes
1119 IF (self%tz < 0)
THEN
1125 hours = int(abs(self%tz))
1126 minutes = nint((abs(self%tz) - hours)*60)
1128 IF (minutes == 60)
THEN
1133 WRITE (unit=
tzoffset(2:5), fmt=
'(2I2.2)') hours, minutes
1141 CLASS(
datetime),
INTENT(in) :: self
1143 INTEGER :: hours, minutes, sgn
1145 hours = int(abs(self%tz))
1146 minutes = nint((abs(self%tz) - hours)*60)
1147 sgn = int(sign(one, self%tz))
1149 utc = self - timedelta(hours=sgn*hours, minutes=sgn*minutes)
1158 CLASS(
datetime),
INTENT(in) :: self
1163 DO month = 1, self%month - 1
1179 CLASS(timedelta),
INTENT(in) :: t
1182 INTEGER :: milliseconds, seconds, minutes, hours, days
1185 month=d0%getMonth(), &
1187 hour=d0%getHour(), &
1188 minute=d0%getMinute(), &
1189 second=d0%getSecond(), &
1190 millisecond=d0%getMillisecond(), &
1193 milliseconds = t%getMilliseconds()
1194 seconds = t%getSeconds()
1195 minutes = t%getMinutes()
1196 hours = t%getHours()
1199 IF (milliseconds /= 0)
CALL d%addMilliseconds(milliseconds)
1200 IF (seconds /= 0)
CALL d%addSeconds(seconds)
1201 IF (minutes /= 0)
CALL d%addMinutes(minutes)
1202 IF (hours /= 0)
CALL d%addHours(hours)
1203 IF (days /= 0)
CALL d%addDays(days)
1212 CLASS(timedelta),
INTENT(in) :: t
1226 CLASS(timedelta),
INTENT(in) :: t
1240 TYPE(timedelta) :: t
1242 REAL(kind=real64) :: daysdiff
1243 INTEGER :: days, hours, minutes, seconds, milliseconds
1248 IF (daysdiff < 0)
THEN
1250 daysdiff = abs(daysdiff)
1255 days = int(daysdiff)
1256 hours = int((daysdiff - days)*d2h)
1257 minutes = int((daysdiff - days - hours*h2d)*d2m)
1258 seconds = int((daysdiff - days - hours*h2d - minutes*m2d)*d2s)
1259 milliseconds = nint((daysdiff - days - hours*h2d - minutes*m2d &
1260 - seconds*s2d)*d2s*1e3_real64)
1262 t = timedelta(sign_*days, sign_*hours, sign_*minutes, sign_*seconds, &
1267 PURE ELEMENTAL LOGICAL FUNCTION gt(d0, d1)
1283 IF (d0_utc%year > d1_utc%year)
THEN
1285 ELSEIF (d0_utc%year < d1_utc%year)
THEN
1290 IF (d0_utc%month > d1_utc%month)
THEN
1292 ELSEIF (d0_utc%month < d1_utc%month)
THEN
1297 IF (d0_utc%day > d1_utc%day)
THEN
1299 ELSEIF (d0_utc%day < d1_utc%day)
THEN
1304 IF (d0_utc%hour > d1_utc%hour)
THEN
1306 ELSEIF (d0_utc%hour < d1_utc%hour)
THEN
1311 IF (d0_utc%minute > d1_utc%minute)
THEN
1313 ELSEIF (d0_utc%minute < d1_utc%minute)
THEN
1318 IF (d0_utc%second > d1_utc%second)
THEN
1320 ELSEIF (d0_utc%second < d1_utc%second)
THEN
1325 IF (d0_utc%millisecond > d1_utc%millisecond)
THEN
1340 PURE ELEMENTAL LOGICAL FUNCTION lt(d0, d1)
1352 PURE ELEMENTAL LOGICAL FUNCTION eq(d0, d1)
1366 eq = d0_utc%year == d1_utc%year .AND. &
1367 d0_utc%month == d1_utc%month .AND. &
1368 d0_utc%day == d1_utc%day .AND. &
1369 d0_utc%hour == d1_utc%hour .AND. &
1370 d0_utc%minute == d1_utc%minute .AND. &
1371 d0_utc%second == d1_utc%second .AND. &
1372 d0_utc%millisecond == d1_utc%millisecond
1376 PURE ELEMENTAL LOGICAL FUNCTION neq(d0, d1)
1384 neq = .NOT. d0 == d1
1388 PURE ELEMENTAL LOGICAL FUNCTION ge(d0, d1)
1397 ge = d0 > d1 .OR. d0 == d1
1401 PURE ELEMENTAL LOGICAL FUNCTION le(d0, d1)
1410 le = d1 > d0 .OR. d0 == d1
1421 INTEGER,
INTENT(in) :: year
1423 isleapyear = (mod(year, 4) == 0 .AND. .NOT. mod(year, 100) == 0) &
1424 .OR. (mod(year, 400) == 0)
1437 TYPE(timedelta),
INTENT(in) :: t
1439 REAL(kind=real64) :: datenum0, datenum1, increment
1440 REAL(kind=real64) :: eps
1451 increment = t%total_seconds()*s2d
1453 nm = floor((datenum1 - datenum0 + eps)/increment) + 1
1468 INTEGER,
INTENT(in) :: month
1469 INTEGER,
INTENT(in) :: year
1471 INTEGER,
PARAMETER,
DIMENSION(12) :: &
1472 days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
1474 IF (month < 1 .OR. month > 12)
THEN
1494 INTEGER,
INTENT(in) :: year
1518 IF (d_utc%year < 1)
THEN
1524 DO year = 1, d_utc%year - 1
1531 + d_utc%minute*m2d &
1532 + (d_utc%second + 1e-3_real64*d_utc%millisecond)*s2d
1541 REAL(kind=real64),
INTENT(in) :: num
1544 INTEGER :: year, month, day, hour, minute, second, millisecond
1545 REAL(kind=real64) :: days, totseconds
1570 totseconds = (days - day)*d2s
1571 hour = int(totseconds*s2h)
1572 minute = int((totseconds - hour*h2s)*s2m)
1573 second = int(totseconds - hour*h2s - minute*m2s)
1574 millisecond = nint((totseconds - int(totseconds))*1e3_real64)
1576 num2date =
datetime(year, month, day, hour, minute, second, millisecond, tz=zero)
1579 IF (
num2date%millisecond == 1000)
THEN
1604 CHARACTER(len=*),
INTENT(in) :: str
1605 CHARACTER(len=*),
INTENT(in) :: format
1608 TYPE(tm_struct) ::
tm
1610 rc = c_strptime(trim(str)//c_null_char, trim(format)//c_null_char,
tm)
1620 TYPE(tm_struct),
INTENT(in) :: ctime
1627 tm2date%month = ctime%tm_mon + 1
1628 tm2date%year = ctime%tm_year + 1900
1641 INTEGER,
INTENT(in) :: i
1642 INTEGER,
INTENT(in) :: length
1644 CHARACTER(len=length) ::
int2str
1645 CHARACTER(len=2) :: string
1647 WRITE (unit=string, fmt=
'(I2)') length
1648 WRITE (unit=
int2str, fmt=
'(I'//string//
'.'//string//
')') i
1668 use,
INTRINSIC :: iso_fortran_env, only: real32, real64
1669 use,
INTRINSIC :: iso_c_binding, only: c_char, c_int, c_null_char
1693 LOGICAL :: alarm = .false.
1696 LOGICAL :: started = .false.
1697 LOGICAL :: stopped = .false.
1713 CLASS(
clock),
INTENT(inout) :: self
1715 self%currentTime = self%startTime
1717 self%started = .false.
1718 self%stopped = .false.
1720 END SUBROUTINE reset
1724 PURE ELEMENTAL SUBROUTINE tick(self)
1728 CLASS(
clock),
INTENT(inout) :: self
1730 IF (self%stopped)
THEN
1734 IF (.NOT. self%started)
THEN
1735 self%started = .true.
1736 self%currentTime = self%startTime
1739 self%currentTime = self%currentTime + self%tickInterval
1741 IF (self%currentTime >= self%stopTime)
THEN
1742 self%stopped = .true.
pure elemental subroutine reset(self)
pure elemental subroutine tick(self)
real(kind=real64), parameter, public h2s
real(kind=real64), parameter, public m2s
real(kind=real64), parameter, public s2m
real(kind=real64), parameter, public d2m
integer, parameter, public maxstrlen
real(kind=real64), parameter, public s2h
real(kind=real64), parameter, public s2d
real(kind=real64), parameter, public h2d
real(kind=real64), parameter, public m2h
real(kind=real64), parameter, public m2d
real(kind=real64), parameter, public d2s
real(kind=real64), parameter, public one
real(kind=real64), parameter, public zero
real(kind=real64), parameter, public d2h
pure elemental integer function getminute(self)
pure elemental real(kind=real64) function, public date2num(d)
pure elemental logical function eq(d0, d1)
pure elemental logical function neq(d0, d1)
pure elemental subroutine adddays(self, d)
pure elemental type(datetime) function datetime_plus_timedelta(d0, t)
type(datetime) function now()
pure elemental logical function le(d0, d1)
pure elemental integer function gethour(self)
pure elemental real(kind=real64) function gettz(self)
pure elemental type(datetime) function datetime_minus_timedelta(d0, t)
pure elemental integer function weekday(self)
pure elemental logical function, public isleapyear(year)
pure elemental subroutine addmilliseconds(self, ms)
integer function, dimension(3) isocalendar(self)
pure elemental integer function getmonth(self)
pure elemental subroutine addseconds(self, s)
pure elemental integer function getsecond(self)
pure elemental type(datetime) function datetime_constructor(year, month, day, hour, minute, second, millisecond, tz)
pure character(len=length) function int2str(i, length)
type(datetime) function, public strptime(str, format)
pure elemental type(timedelta) function datetime_minus_datetime(d0, d1)
pure elemental type(tm_struct) function tm(self)
pure elemental logical function ge(d0, d1)
pure elemental subroutine addminutes(self, m)
pure elemental integer function isoweekday(self)
integer function secondssinceepoch(self)
pure elemental logical function isvalid(self)
pure elemental subroutine addhours(self, h)
pure elemental logical function gt(d0, d1)
pure elemental type(datetime) function timedelta_plus_datetime(t, d0)
pure elemental logical function lt(d0, d1)
pure elemental integer function yearday(self)
pure elemental character(len=9) function weekdaylong(self)
pure elemental character(len=5) function tzoffset(self)
pure type(datetime) function, dimension(:), allocatable, public datetimerange(d0, d1, t)
pure elemental integer function getmillisecond(self)
pure elemental character(len=3) function weekdayshort(self)
pure elemental type(datetime) function utc(self)
pure elemental integer function, public daysinmonth(month, year)
pure elemental integer function getyear(self)
pure elemental character(len=23) function isoformat(self, sep)
pure elemental type(datetime) function, public num2date(num)
pure elemental character(len=9) function isoweekdaylong(self)
pure elemental type(datetime) function, public tm2date(ctime)
pure elemental integer function, public daysinyear(year)
character(len=:) function, allocatable strftime(self, format)
pure elemental integer function getday(self)
pure elemental character(len=3) function isoweekdayshort(self)
pure elemental type(timedelta) function timedelta_plus_timedelta(t0, t1)
pure elemental integer function getdays(self)
pure elemental integer function gethours(self)
pure elemental logical function le(td0, td1)
pure elemental logical function ge(td0, td1)
pure elemental integer function getminutes(self)
pure elemental logical function eq(td0, td1)
pure elemental logical function neq(td0, td1)
pure elemental type(timedelta) function timedelta_constructor(days, hours, minutes, seconds, milliseconds)
pure elemental real(kind=real64) function total_seconds(self)
pure elemental logical function lt(td0, td1)
pure elemental integer function getmilliseconds(self)
pure elemental type(timedelta) function timedelta_minus_timedelta(t0, t1)
pure elemental integer function getseconds(self)
pure elemental type(timedelta) function unary_minus_timedelta(t0)
pure elemental logical function gt(td0, td1)