mtime 1.2.2
Loading...
Searching...
No Matches
libmtime Fortran language bindings
Collaboration diagram for libmtime Fortran language bindings:

Namespaces

module  mtime_calendar
 Provides the calendar to the users, abstracting the different calendars available.
 
module  mtime_julianday
 Julian Day Calendar and some operations supported on julian dates.
 
module  mtime_date
 Date and some operations supported on Date.
 
module  mtime_time
 Time and some operations supported on Time.
 
module  mtime_datetime
 DateTime and some operations supported on DateTime.
 
module  mtime_timedelta
 TimeDelta and some operations supported on TimeDelta.
 
module  mtime_events
 Definition of the basic event type and its methods.
 
module  mtime_eventgroups
 Event-groups which contains a list of events.
 
module  mtime_utilities
 Support for handling ISO 8601:2004 repeated time interval strings.
 

Data Structures

interface  mtime_julianday::operator(+)
 
interface  mtime_julianday::operator(-)
 
interface  mtime_julianday::operator(>)
 
interface  mtime_julianday::operator(<)
 
interface  mtime_julianday::operator(<=)
 
interface  mtime_julianday::operator(>=)
 
interface  mtime_julianday::operator(==)
 
interface  mtime_julianday::operator(/=)
 
interface  mtime_datetime::min
 
interface  mtime_datetime::max
 
interface  mtime_datetime::operator(>)
 
interface  mtime_datetime::operator(<)
 
interface  mtime_datetime::operator(<=)
 
interface  mtime_datetime::operator(>=)
 
interface  mtime_datetime::operator(==)
 
interface  mtime_datetime::operator(/=)
 
interface  mtime_timedelta::operator(+)
 
interface  mtime_timedelta::operator(-)
 
interface  mtime_timedelta::operator(*)
 
interface  mtime_timedelta::operator(>)
 
interface  mtime_timedelta::operator(<)
 
interface  mtime_timedelta::operator(<=)
 
interface  mtime_timedelta::operator(>=)
 
interface  mtime_timedelta::operator(==)
 
interface  mtime_timedelta::operator(/=)
 
interface  mtime_timedelta::getptstringfromseconds
 

Functions

recursive subroutine, public mtime_calendar::calendartostring (string, errno)
 Initialize a new calendar.
 
recursive subroutine, public mtime_juliandelta::deallocatejuliandelta (my_juliandelta)
 destructor for a Julian delta
 
recursive subroutine mtime_julianday::assignment(=)::replacejulianday (dest, src)
 
recursive type(julianday) function, target mtime_julianday::operator(+)::addjuliandeltatojulianday (op1, op2)
 
recursive type(julianday) function, target mtime_julianday::operator(+)::addjuliandaytojuliandelta (op2, op1)
 
recursive type(juliandelta) function, target mtime_julianday::operator(-)::subtractjuliandayfromjulianday (op1, op2)
 
 mtime_julianday::operator(>)::julianday_gt
 
 mtime_julianday::operator(<)::julianday_lt
 
 mtime_julianday::operator(<=)::julianday_lt_or_eq
 
 mtime_julianday::operator(>=)::julianday_gt_or_eq
 
 mtime_julianday::operator(==)::julianday_eq
 
 mtime_julianday::operator(/=)::julianday_ne
 
recursive type(julianday) function, pointer, public mtime_julianday::newjulianday (day, ms, errno)
 construct a new Julian date
 
recursive subroutine, public mtime_julianday::deallocatejulianday (my_julianday)
 destructor for a Julian date
 
recursive subroutine, public mtime_julianday::juliandaytostring (my_julianday, string, errno)
 get Julian day as a string.
 
recursive type(date) function, pointer mtime_date::newdate::newdatefromstring (string, errno)
 construct a new date
 
recursive type(date) function, pointer mtime_date::newdate::newdatefromraw (year, month, day, errno)
 construct a new date from raw date
 
recursive type(date) function, pointer mtime_date::newdate::newdatefromraw_yi8 (year, month, day, errno)
 construct a new date from raw date
 
recursive type(date) function, pointer mtime_date::newdate::newdatefromconstructandcopy (src, errno)
 construct a new date from an existing by construct and copy
 
recursive subroutine, public mtime_date::deallocatedate (my_date)
 destructor for a date
 
recursive subroutine, public mtime_date::replacedate (dest, src, errno)
 repace an existing date by a given one
 
recursive subroutine, public mtime_date::datetostring (my_date, string, errno)
 Get Date as an extended string.
 
recursive subroutine, public mtime_date::datetoposixstring (my_date, string, fmtstr, errno)
 Get date and return as a string.
 
recursive type(time) function, pointer mtime_time::newtime::newtimefromstring (string, errno)
 
recursive type(time) function, pointer mtime_time::newtime::newtimefromraw (hour, minute, second, ms, errno)
 
recursive type(time) function, pointer mtime_time::newtime::newtimefromconstructandcopy (src, errno)
 
recursive subroutine, public mtime_time::deallocatetime (my_time)
 Destructor of Time.
 
recursive subroutine, public mtime_time::replacetime (dest, src, errno)
 COPY a time object.
 
recursive subroutine, public mtime_time::timetostring (my_time, string, errno)
 Get time as an extended string.
 
recursive subroutine, public mtime_time::timetoposixstring (my_time, string, fmtstr, errno)
 Get time as a Posix formated string.
 
recursive type(datetime) function, pointer mtime_datetime::newdatetime::newdatetimefromstring (string, errno)
 
recursive type(datetime) function, pointer mtime_datetime::newdatetime::newdatetimefromraw (year, month, day, hour, minute, second, ms, errno)
 
recursive type(datetime) function, pointer mtime_datetime::newdatetime::newdatetimefromraw_yi8 (year, month, day, hour, minute, second, ms, errno)
 
recursive type(datetime) function, pointer mtime_datetime::newdatetime::newdatetimefromconstructandcopy (src, errno)
 
recursive type(datetime) function, pointer mtime_datetime::min::datetime_min (a, b)
 
recursive type(datetime) function, pointer mtime_datetime::max::datetime_max (a, b)
 
recursive subroutine mtime_datetime::assignment(=)::replacedatetime (dest, src)
 
 mtime_datetime::operator(>)::datetime_gt
 
 mtime_datetime::operator(<)::datetime_lt
 
 mtime_datetime::operator(<=)::datetime_lt_or_eq
 
 mtime_datetime::operator(>=)::datetime_gt_or_eq
 
 mtime_datetime::operator(==)::datetime_eq
 
 mtime_datetime::operator(/=)::datetime_ne
 
recursive subroutine, public mtime_datetime::deallocatedatetime (my_datetime)
 Destructor of DateTime.
 
recursive subroutine, public mtime_datetime::datetimetostring (my_datetime, string, errno)
 Get DateTime as a string.
 
recursive subroutine, public mtime_datetime::datetimetoposixstring (my_datetime, string, fmtstr, errno)
 Get DateTime in 'struct tm' format and return as a string.
 
recursive integer(c_int) function, public mtime_datetime::getnoofdaysinmonthdatetime (dt, errno)
 Get nod (number of Days) in the month of DateTime.
 
recursive integer(c_int) function, public mtime_datetime::getnoofdaysinyeardatetime (dt, errno)
 Get number of days in the Year of DateTime.
 
recursive integer(c_int) function, public mtime_datetime::getdayofyearfromdatetime (dt, errno)
 Get the 'day-of-year' value of a DateTime.
 
recursive integer(c_int64_t) function, public mtime_datetime::getnoofsecondselapsedinmonthdatetime (dt, errno)
 Get number of seconds elapsed in the month of DateTime.
 
recursive integer(c_int) function, public mtime_datetime::getnoofsecondselapsedindaydatetime (dt, errno)
 Get number of seconds elapsed in the day of DateTime.
 
recursive subroutine, public mtime_datetime::getjuliandayfromdatetime (dt, jd, errno)
 Get the Julian Day from DateTime.
 
recursive subroutine, public mtime_datetime::getdatetimefromjulianday (jd, dt, errno)
 Get the DateTime from Julian Day.
 
recursive type(timedelta) function, pointer mtime_timedelta::newtimedelta::newtimedeltafromstring (string, errno)
 
recursive type(timedelta) function, pointer mtime_timedelta::newtimedelta::newtimedeltafromraw (sign, year, month, day, hour, minute, second, ms, errno)
 
recursive type(timedelta) function, pointer mtime_timedelta::newtimedelta::newtimedeltafromraw_yi8 (sign, year, month, day, hour, minute, second, ms, errno)
 
recursive type(timedelta) function, pointer mtime_timedelta::newtimedelta::newtimedeltafromconstructandcopy (src, errno)
 
recursive type(datetime) function, target mtime_timedelta::operator(+)::addtimedeltatodatetime (op1, op2)
 
recursive type(datetime) function, target mtime_timedelta::operator(+)::adddatetimetotimedelta (op2, op1)
 
recursive type(date) function, target mtime_timedelta::operator(+)::addtimedeltatodate (op1, op2)
 
recursive type(date) function, target mtime_timedelta::operator(+)::adddatetotimedelta (op2, op1)
 
recursive type(timedelta) function, target mtime_timedelta::operator(+)::elementwiseaddtimedeltatotimedelta (td1, td2)
 
recursive type(timedelta) function, target mtime_timedelta::operator(-)::gettimedeltafromdate (op1, op2)
 Get the TimeDelta between two Dates op1 and op2 as (op1-op22).
 
recursive type(timedelta) function, target mtime_timedelta::operator(-)::gettimedeltafromdatetime (op1, op2)
 Get the TimeDelta between two DateTimes op1 and op2 as (op1-op2).
 
recursive type(timedelta) function, target mtime_timedelta::operator(*)::elementwisescalarmultiplytimedelta (base_td, ilambda)
 
recursive type(timedelta) function, target mtime_timedelta::operator(*)::elementwisescalarmultiplytimedeltainv (ilambda, base_td)
 
recursive type(timedelta) function, target mtime_timedelta::operator(*)::elementwisescalarmultiplytimedelta_long (base_td, lambda)
 
recursive type(timedelta) function, target mtime_timedelta::operator(*)::elementwisescalarmultiplytimedeltainv_long (lambda, base_td)
 
recursive type(timedelta) function, target mtime_timedelta::operator(*)::elementwisescalarmultiplytimedelta_real (base_td, lambda)
 
 mtime_timedelta::operator(>)::timedelta_gt
 
 mtime_timedelta::operator(<)::timedelta_lt
 
 mtime_timedelta::operator(<=)::timedelta_lt_or_eq
 
 mtime_timedelta::operator(>=)::timedelta_gt_or_eq
 
 mtime_timedelta::operator(==)::timedelta_eq
 
 mtime_timedelta::operator(/=)::timedelta_ne
 
recursive subroutine mtime_timedelta::getptstringfromseconds::getptstringfromsecondsint (s, string, errno)
 
recursive subroutine mtime_timedelta::getptstringfromseconds::getptstringfromsecondsfloat (s, string, errno)
 
recursive subroutine mtime_timedelta::getptstringfromseconds::getptstringfromsecondsdouble (s, string, errno)
 
recursive subroutine, public mtime_timedelta::deallocatetimedelta (my_timedelta)
 Destructor of TimeDelta.
 
recursive type(timedelta) function, target, public mtime_timedelta::gettimedeltafromdate (op1, op2)
 Get the TimeDelta between two Dates op1 and op2 as (op1-op22).
 
recursive type(timedelta) function, target, public mtime_timedelta::gettimedeltafromdatetime (op1, op2)
 Get the TimeDelta between two DateTimes op1 and op2 as (op1-op2).
 
recursive integer(c_int64_t) function, public mtime_timedelta::gettotalmillisecondstimedelta (td, dt, errno)
 Get total number of milliseconds in timedelta.
 
recursive integer(c_int64_t) function, public mtime_timedelta::gettotalsecondstimedelta (td, dt, errno)
 Get total number of seconds in timedelta.
 
recursive subroutine, public mtime_timedelta::timedeltatostring (my_timedelta, string, errno)
 Get TimeDelta as an extended string.
 
recursive integer(c_int64_t) function, public mtime_timedelta::modulotimedelta (a, p, quot)
 Returns modulo(a,p) and the quotient.
 
recursive subroutine, public mtime_timedelta::getptstringfromms (ms, string, errno)
 Return a PT String corresponding to arbitrary number of milliseconds.
 
recursive subroutine, public mtime_timedelta::getptstringfromminutes (m, string, errno)
 Return a PT String corresponding to arbitrary number of minutes.
 
recursive subroutine, public mtime_timedelta::getptstringfromhours (h, string, errno)
 Return a PT String corresponding to arbitrary number of Hours.
 
recursive subroutine, public mtime_timedelta::timedeltatojuliandelta (td, dt, jd)
 Convert time delta to "Julian calendar delta".
 
recursive subroutine, public mtime_timedelta::dividetimedeltainseconds (dividend, divisor, quotient, errna)
 division by seconds.
 
recursive subroutine, public mtime_timedelta::dividetwodatetimediffsinseconds (dt1_dividend, dt2_dividend, dt1_divisor, dt2_divisor, denominator, quotient)
 division of two differences in datetimes.
 
recursive subroutine, public mtime_timedelta::dividedatetimedifferenceinseconds (dt1, dt2, divisor, quotient, errna)
 division of an datetime interval by seconds.
 
recursive type(event) function, pointer mtime_events::newevent::neweventwithstring (name, referencedate, firstdate, lastdate, interval, offset, errno)
 
recursive type(event) function, pointer mtime_events::newevent::neweventwithdatatypes (name, referencedate, firstdate, lastdate, interval, offset, errno)
 
recursive type(event) function, pointer mtime_events::newevent::constructandcopyevent (my_event, errno)
 
recursive subroutine, public mtime_events::deallocateevent (my_event)
 Destructor of Event.
 
recursive subroutine, public mtime_events::eventtostring (my_event, string, errno)
 Get Event as a string.
 
recursive logical(c_bool) function, public mtime_events::iscurrenteventactive (my_event, my_datetime, plus_slack, minus_slack)
 Check if this event is active by comparing event's trigger time with current_dt.
 
recursive logical(c_bool) function, public mtime_events::iseventnextinnextday (my_event)
 Checks, if next event is on a new day.
 
recursive logical(c_bool) function, public mtime_events::iseventnextinnextmonth (my_event)
 Checks, if next event is in a new month.
 
recursive logical(c_bool) function, public mtime_events::iseventnextinnextyear (my_event)
 Checks, if next event is in a new year.
 
recursive subroutine, public mtime_events::gettriggernexteventatdatetime (my_event, my_currentdatetime, my_datetime, errno)
 Get the Datetime when 'this' event will be triggered next.
 
recursive subroutine, public mtime_events::gettriggeredpreviouseventatdatetime (my_event, my_datetime, errno)
 Get the Datetime when 'this' event will be triggered last.
 
recursive integer(c_int64_t) function, public mtime_events::geteventid (my_event)
 get the event id
 
recursive subroutine, public mtime_events::geteventname (my_event, string, errno)
 get the event name
 
recursive type(datetime) function, pointer, public mtime_events::geteventreferencedatetime (my_event)
 get the event reference date
 
recursive type(datetime) function, pointer, public mtime_events::geteventfirstdatetime (my_event)
 get the event first date
 
recursive type(datetime) function, pointer, public mtime_events::geteventlastdatetime (my_event)
 get the event last date
 
recursive type(timedelta) function, pointer, public mtime_events::geteventinterval (my_event)
 get the event interval
 
recursive logical(c_bool) function, public mtime_events::getnexteventisfirst (my_event)
 Check if event is first.
 
recursive logical(c_bool) function, public mtime_events::geteventisfirstinday (my_event)
 Check if event is first in day.
 
recursive logical(c_bool) function, public mtime_events::geteventisfirstinmonth (my_event)
 Check if event is first in month.
 
recursive logical(c_bool) function, public mtime_events::geteventisfirstinyear (my_event)
 Check if event is first in year.
 
recursive logical(c_bool) function, public mtime_events::geteventislastinday (my_event)
 Check if event is last in day.
 
recursive logical(c_bool) function, public mtime_events::geteventislastinmonth (my_event)
 Check if event is last in month.
 
recursive logical(c_bool) function, public mtime_events::geteventislastinyear (my_event)
 Check if event is last in year.
 
recursive subroutine, public mtime_eventgroups::deallocateeventgroup (my_eventgroup)
 Destructor of EventGroup.
 
recursive logical function, public mtime_eventgroups::addeventtoeventgroup (my_event, my_eventgroup)
 Add new event to an eventgroup.
 
recursive logical function, public mtime_eventgroups::removeeventfromeventgroup (my_name, my_eventgroup)
 Remove event from eventgroup. CRITICAL: Also, deallocate the event.
 
recursive integer(c_int64_t) function, public mtime_eventgroups::geteventgroupid (my_eventgroup)
 Get event group id.
 
recursive subroutine, public mtime_eventgroups::geteventgroupname (my_eventgroup, string, errno)
 get the event group name
 
recursive type(event) function, pointer, public mtime_eventgroups::getfirsteventfromeventgroup (my_eventgroup)
 get the first event in event group
 
recursive type(event) function, pointer, public mtime_eventgroups::getnexteventfromeventgroup (my_event)
 get the next event in an event group an event belongs to
 
recursive integer function, public mtime_utilities::getrepetitions (repetitionstring)
 Extract number of repetitions from repetition string part.
 
recursive subroutine, public mtime_utilities::splitrepetitionstring (recurringtimeinterval, repetitor, start, end, duration, lrepetitor, lstart, lend, lduration)
 Split ISO 8601:2004 repeated time interval strings into base components.
 

Detailed Description

This module documents the Fortran language bindings


Data Structure Documentation

◆ mtime_julianday::operator(+)

interface mtime_julianday::operator(+)

Public Member Functions

recursive type(julianday) function, target addjuliandeltatojulianday (op1, op2)
 
recursive type(julianday) function, target addjuliandaytojuliandelta (op2, op1)
 

◆ mtime_julianday::operator(-)

interface mtime_julianday::operator(-)

Public Member Functions

recursive type(juliandelta) function, target subtractjuliandayfromjulianday (op1, op2)
 

◆ mtime_julianday::operator(>)

interface mtime_julianday::operator(>)

Public Member Functions

 julianday_gt
 

◆ mtime_julianday::operator(<)

interface mtime_julianday::operator(<)

Public Member Functions

 julianday_lt
 

◆ mtime_julianday::operator(<=)

interface mtime_julianday::operator(<=)

Public Member Functions

 julianday_lt_or_eq
 

◆ mtime_julianday::operator(>=)

interface mtime_julianday::operator(>=)

Public Member Functions

 julianday_gt_or_eq
 

◆ mtime_julianday::operator(==)

interface mtime_julianday::operator(==)

Public Member Functions

 julianday_eq
 

◆ mtime_julianday::operator(/=)

interface mtime_julianday::operator(/=)

Public Member Functions

 julianday_ne
 

◆ mtime_datetime::min

interface mtime_datetime::min

Public Member Functions

recursive type(datetime) function, pointer datetime_min (a, b)
 

◆ mtime_datetime::max

interface mtime_datetime::max

Public Member Functions

recursive type(datetime) function, pointer datetime_max (a, b)
 

◆ mtime_datetime::operator(>)

interface mtime_datetime::operator(>)

Public Member Functions

 datetime_gt
 

◆ mtime_datetime::operator(<)

interface mtime_datetime::operator(<)

Public Member Functions

 datetime_lt
 

◆ mtime_datetime::operator(<=)

interface mtime_datetime::operator(<=)

Public Member Functions

 datetime_lt_or_eq
 

◆ mtime_datetime::operator(>=)

interface mtime_datetime::operator(>=)

Public Member Functions

 datetime_gt_or_eq
 

◆ mtime_datetime::operator(==)

interface mtime_datetime::operator(==)

Public Member Functions

 datetime_eq
 

◆ mtime_datetime::operator(/=)

interface mtime_datetime::operator(/=)

Public Member Functions

 datetime_ne
 

◆ mtime_timedelta::operator(+)

interface mtime_timedelta::operator(+)

Public Member Functions

recursive type(datetime) function, target addtimedeltatodatetime (op1, op2)
 
recursive type(datetime) function, target adddatetimetotimedelta (op2, op1)
 
recursive type(date) function, target addtimedeltatodate (op1, op2)
 
recursive type(date) function, target adddatetotimedelta (op2, op1)
 
recursive type(timedelta) function, target elementwiseaddtimedeltatotimedelta (td1, td2)
 

◆ mtime_timedelta::operator(-)

interface mtime_timedelta::operator(-)

Public Member Functions

recursive type(timedelta) function, target gettimedeltafromdate (op1, op2)
 Get the TimeDelta between two Dates op1 and op2 as (op1-op22).
 
recursive type(timedelta) function, target gettimedeltafromdatetime (op1, op2)
 Get the TimeDelta between two DateTimes op1 and op2 as (op1-op2).
 

◆ mtime_timedelta::operator(*)

interface mtime_timedelta::operator(*)

Public Member Functions

recursive type(timedelta) function, target elementwisescalarmultiplytimedelta (base_td, ilambda)
 
recursive type(timedelta) function, target elementwisescalarmultiplytimedeltainv (ilambda, base_td)
 
recursive type(timedelta) function, target elementwisescalarmultiplytimedelta_long (base_td, lambda)
 
recursive type(timedelta) function, target elementwisescalarmultiplytimedeltainv_long (lambda, base_td)
 
recursive type(timedelta) function, target elementwisescalarmultiplytimedelta_real (base_td, lambda)
 

◆ mtime_timedelta::operator(>)

interface mtime_timedelta::operator(>)

Public Member Functions

 timedelta_gt
 

◆ mtime_timedelta::operator(<)

interface mtime_timedelta::operator(<)

Public Member Functions

 timedelta_lt
 

◆ mtime_timedelta::operator(<=)

interface mtime_timedelta::operator(<=)

Public Member Functions

 timedelta_lt_or_eq
 

◆ mtime_timedelta::operator(>=)

interface mtime_timedelta::operator(>=)

Public Member Functions

 timedelta_gt_or_eq
 

◆ mtime_timedelta::operator(==)

interface mtime_timedelta::operator(==)

Public Member Functions

 timedelta_eq
 

◆ mtime_timedelta::operator(/=)

interface mtime_timedelta::operator(/=)

Public Member Functions

 timedelta_ne
 

◆ mtime_timedelta::getptstringfromseconds

interface mtime_timedelta::getptstringfromseconds

Public Member Functions

recursive subroutine getptstringfromsecondsint (s, string, errno)
 
recursive subroutine getptstringfromsecondsfloat (s, string, errno)
 
recursive subroutine getptstringfromsecondsdouble (s, string, errno)
 

Function Documentation

◆ addeventtoeventgroup()

recursive logical function, public mtime_eventgroups::addeventtoeventgroup ( type(event), intent(in), target my_event,
type(eventgroup), intent(inout), target my_eventgroup )

Add new event to an eventgroup.

Parameters
my_eventA reference to type event. The event to be added.
my_eventgroupA reference to type eventgroup. The eventgroup where the event is added.
Returns
ret true/false indicating success or failure of addition.

◆ calendartostring()

recursive subroutine, public mtime_calendar::calendartostring ( character(len=max_calendar_str_len), intent(out) string,
integer, optional errno )

Initialize a new calendar.

setCalendar is done at the very begining to select one of the provided calendar libraries. It intializes the calendar to one of:

  • proleptic_gregorian
  • year_of_365_days
  • year_of_360_days

The calendar type and hence it's behaviour (Calendar to Julian conversion and vice versa) is fixed for the lifetime of the selected calendar. Attempts to change the calendar type on the fly is discouraged. The lib has built-in checks to reject change attempts at run time. However, a calendar can be "re-initialized" after calling resetCalendar(), but this is not advised.

MANTRA: Know what you are doing before you do it and do it right the first time.

convert the calendar identifier into a human readable string

Parameters
[out]stringthe calendar type verbose
[out]errnooptional, error message

◆ datetimetoposixstring()

recursive subroutine, public mtime_datetime::datetimetoposixstring ( type(datetime), intent(in), target my_datetime,
character(len=max_datetime_str_len) string,
character(len=*) fmtstr,
integer, optional errno )

Get DateTime in 'struct tm' format and return as a string.

Only dates between and including 1582-10-15 TO 9999-12-31 supported.

Parameters
my_datetimeAn object of type datetime. The datetime to be converted to string.
stringString where datetime is to be written.
fmtstrDesired Format string. CRITICAL: Inappropriate fmt string will cause dump.
[out]errnooptional, error message

◆ datetimetostring()

recursive subroutine, public mtime_datetime::datetimetostring ( type(datetime), intent(in), target my_datetime,
character(len=max_datetime_str_len) string,
integer, optional errno )

Get DateTime as a string.

datetimeToString returns a string in IS08601 compliant (and extended) format.

Parameters
[in]my_datetimeA pointer to struct _datetime. The datetime to be converted to string.
[out]stringString where datetime is to be written.
[out]errnooptional, error message

◆ datetoposixstring()

recursive subroutine, public mtime_date::datetoposixstring ( type(date), pointer my_date,
character(len=max_date_str_len) string,
character(len=*) fmtstr,
integer, optional errno )

Get date and return as a string.

Only dates between and including 1582-10-15 TO 9999-12-31 supported.

Parameters
[in]my_dateA pointer to type date. The date to be converted to string.
[out]stringString where date is to be written.
[in]fmtstrDesired Format string. CRITICAL: Inappropriate fmt string will cause dump.
[out]errnooptional, error message

◆ datetostring()

recursive subroutine, public mtime_date::datetostring ( type(date), pointer my_date,
character(len=max_date_str_len) string,
integer, optional errno )

Get Date as an extended string.

DateToString returns a string in IS08601 compliant (and extended) format.

Parameters
[in]my_dateA pointer to type date. The date to be converted to string.
[out]stringString where date is to be written.
[out]errnoOptional, error message

◆ deallocatedate()

recursive subroutine, public mtime_date::deallocatedate ( type(date), pointer my_date)

destructor for a date

Parameters
[in]my_datea pointer of type(date)

◆ deallocatedatetime()

recursive subroutine, public mtime_datetime::deallocatedatetime ( type(datetime), pointer my_datetime)

Destructor of DateTime.

Parameters
my_datetimeA pointer to type datetime. my_datetime is deallocated.

◆ deallocateevent()

recursive subroutine, public mtime_events::deallocateevent ( type(event), pointer my_event)

Destructor of Event.

Parameters
my_eventA pointer to type event. my_event is deallocated.

WARNING: If my_event was added to a group, this should never be called; use removeEventFromEventGroup instead.

◆ deallocateeventgroup()

recursive subroutine, public mtime_eventgroups::deallocateeventgroup ( type(eventgroup), pointer my_eventgroup)

Destructor of EventGroup.

Parameters
[in]my_eventgroupA pointer to type eventGroup. my_eventgroup is deallocated.

◆ deallocatejulianday()

recursive subroutine, public mtime_julianday::deallocatejulianday ( type(julianday), pointer my_julianday)

destructor for a Julian date

Parameters
my_juliandaya pointer of type(julianday)

◆ deallocatetime()

recursive subroutine, public mtime_time::deallocatetime ( type(time), pointer my_time)

Destructor of Time.

Parameters
my_timeA pointer to type time. my_time is deallocated.

◆ deallocatetimedelta()

recursive subroutine, public mtime_timedelta::deallocatetimedelta ( type(timedelta), pointer my_timedelta)

Destructor of TimeDelta.

Parameters
my_timedeltaA pointer to typetimedelta. my_timedelta is deallocated.

◆ dividedatetimedifferenceinseconds()

recursive subroutine, public mtime_timedelta::dividedatetimedifferenceinseconds ( type(datetime), intent(in), target dt1,
type(datetime), intent(in), target dt2,
type(timedelta), intent(in), target divisor,
type(divisionquotienttimespan), intent(out), target quotient,
integer, intent(out), optional errna )

division of an datetime interval by seconds.

the datetime interval is calculated by dt1-dt2.

Parameters
[in]dt1A pointer to type datetime
[in]dt2A pointer to type datetime
[in]divisorA pointer to type timedelta
[out]quotientA pointer to type divisionquotienttimespan

◆ dividetimedeltainseconds()

recursive subroutine, public mtime_timedelta::dividetimedeltainseconds ( type(timedelta), intent(in), target dividend,
type(timedelta), intent(in), target divisor,
type(divisionquotienttimespan), intent(out), target quotient,
integer, intent(out), optional errna )

division by seconds.

Parameters
[in]dividendA pointer to type timedelta
[in]divisorA pointer to type timedelta
[out]quotientA pointer to type divisionquotienttimespan

◆ dividetwodatetimediffsinseconds()

recursive subroutine, public mtime_timedelta::dividetwodatetimediffsinseconds ( type(datetime), intent(in), target dt1_dividend,
type(datetime), intent(in), target dt2_dividend,
type(datetime), intent(in), target dt1_divisor,
type(datetime), intent(in), target dt2_divisor,
integer(c_int64_t), intent(out), target denominator,
type(divisionquotienttimespan), intent(out), target quotient )

division of two differences in datetimes.

Parameters
dt1_dividend,dt2_dividend,dt1_divisor,dt2_divisorReference date (a pointer to struct _datetime).
intvlsecInterval given in seconds.
Returns
result of division. NULL indicates error.

◆ eventtostring()

recursive subroutine, public mtime_events::eventtostring ( type(event), intent(in), pointer my_event,
character(len=max_eventname_str_len), intent(out) string,
integer, intent(out), optional errno )

Get Event as a string.

Parameters
[in]my_eventA pointer to type event. The event to be converted to string.
[out]stringString where event is to be written.
[out]errnooptional, error message

◆ getdatetimefromjulianday()

recursive subroutine, public mtime_datetime::getdatetimefromjulianday ( type(julianday), intent(in), target jd,
type(datetime), intent(out), target dt,
integer, optional errno )

Get the DateTime from Julian Day.

The routine getDateTimeFromJulianDay returns the equivalent DateTime to Julian date. Internally it calls translation routines based on Calendar type.

Parameters
[in]jdA pointer to type julianday. The JD's value is converted to julian day value.
[out]dtA pointer to type datetime. The DT where the converted value is stored.
[out]errnooptional, error message

◆ getdayofyearfromdatetime()

recursive integer(c_int) function, public mtime_datetime::getdayofyearfromdatetime ( type(datetime), target dt,
integer, optional errno )

Get the 'day-of-year' value of a DateTime.

Routine getDayOfYearFromDateTime returns Day of Year for the DateTime. This routine supports all Calendar types.

For eg. the day of year value for 2001-10-15T00:00:00.000 will be 288 for Gregorian Calendar. Similarly, this value will be 285 for Calendar of type 360 day-Calendar.

Parameters
[in]dtA pointer to type datetime. Retrieve the 'day-of-year' from this DT object.
Returns
doy Integer value of doy. The value depends on the calendar type. Zero indicates error.
Parameters
[out]errnooptional, error message

◆ geteventfirstdatetime()

recursive type(datetime) function, pointer, public mtime_events::geteventfirstdatetime ( type(event), intent(in), pointer my_event)

get the event first date

Parameters
[in]my_eventA pointer of type event.
Returns
ret_eventFirstDateTime A pointer of type datetime. The event's first date.

◆ geteventgroupid()

recursive integer(c_int64_t) function, public mtime_eventgroups::geteventgroupid ( type(eventgroup), intent(in), pointer my_eventgroup)

Get event group id.

Parameters
[in]my_eventgroupA pointer to type eventgroup.
Returns
ret_grpid The event group id

◆ geteventgroupname()

recursive subroutine, public mtime_eventgroups::geteventgroupname ( type(eventgroup), intent(in), pointer my_eventgroup,
character(len=max_groupname_str_len) string,
integer, optional errno )

get the event group name

Parameters
[in]my_eventgroupA pointer of type event.
[out]stringthe name of the event group
[out]errnooptional, error message

◆ geteventid()

recursive integer(c_int64_t) function, public mtime_events::geteventid ( type(event), pointer my_event)

get the event id

Parameters
[in]my_eventA pointer of type event.
Returns
ret_evtid the event id

◆ geteventinterval()

recursive type(timedelta) function, pointer, public mtime_events::geteventinterval ( type(event), intent(in), pointer my_event)

get the event interval

Parameters
[in]my_eventA pointer of type event.
Returns
ret_eventInterval A pointer of type timedelta. The event's last date.

◆ geteventisfirstinday()

recursive logical(c_bool) function, public mtime_events::geteventisfirstinday ( type(event), intent(in), target my_event)

Check if event is first in day.

Parameters
[in]my_eventA reference of type event.
Returns
ret Logical: true if event is first in day

◆ geteventisfirstinmonth()

recursive logical(c_bool) function, public mtime_events::geteventisfirstinmonth ( type(event), intent(in), target my_event)

Check if event is first in month.

Parameters
[in]my_eventA reference of type event.
Returns
ret Logical: true if event is first in month

◆ geteventisfirstinyear()

recursive logical(c_bool) function, public mtime_events::geteventisfirstinyear ( type(event), intent(in), target my_event)

Check if event is first in year.

Parameters
[in]my_eventA reference of type event.
Returns
ret Logical: true if event is first in year

◆ geteventislastinday()

recursive logical(c_bool) function, public mtime_events::geteventislastinday ( type(event), intent(in), target my_event)

Check if event is last in day.

Parameters
[in]my_eventA reference of type event.
Returns
ret Logical: true if event is last in day

◆ geteventislastinmonth()

recursive logical(c_bool) function, public mtime_events::geteventislastinmonth ( type(event), intent(in), target my_event)

Check if event is last in month.

Parameters
[in]my_eventA reference of type event.
Returns
ret Logical: true if event is last in month

◆ geteventislastinyear()

recursive logical(c_bool) function, public mtime_events::geteventislastinyear ( type(event), intent(in), target my_event)

Check if event is last in year.

Parameters
[in]my_eventA reference of type event.
Returns
ret Logical: true if event is last in year

◆ geteventlastdatetime()

recursive type(datetime) function, pointer, public mtime_events::geteventlastdatetime ( type(event), intent(in), pointer my_event)

get the event last date

Parameters
[in]my_eventA pointer of type event.
Returns
ret_eventLastDateTime A pointer of type datetime. The event's last date.

◆ geteventname()

recursive subroutine, public mtime_events::geteventname ( type(event), intent(in), pointer my_event,
character(len=max_eventname_str_len), intent(out) string,
integer, optional errno )

get the event name

Parameters
[in]my_eventA pointer of type event.
[out]stringthe name of the event
[out]errnooptional, error message

◆ geteventreferencedatetime()

recursive type(datetime) function, pointer, public mtime_events::geteventreferencedatetime ( type(event), intent(in), pointer my_event)

get the event reference date

Parameters
[in]my_eventA pointer of type event.
Returns
ret_referenceDateTime A pointer of type datetime. The event's reference date.

◆ getfirsteventfromeventgroup()

recursive type(event) function, pointer, public mtime_eventgroups::getfirsteventfromeventgroup ( type(eventgroup), intent(in), pointer my_eventgroup)

get the first event in event group

Parameters
[in]my_eventgroupA pointer of type eventgroup.
Returns
ret_event A pointer of type event. The first event in eventgroup

◆ getjuliandayfromdatetime()

recursive subroutine, public mtime_datetime::getjuliandayfromdatetime ( type(datetime), target dt,
type(julianday), target jd,
integer, optional errno )

Get the Julian Day from DateTime.

The routine getJulianDayFromDateTime returns the equivalent Julian date to DateTime. Internally it calls translation routines based on Calendar type.

Parameters
[in]dtA pointer to type datetime. The DT's value is converted to julian day value.
[out]jdA pointer to type julianday. JD where the converted value is stored.
[out]errnooptional, error message

◆ getnexteventfromeventgroup()

recursive type(event) function, pointer, public mtime_eventgroups::getnexteventfromeventgroup ( type(event), intent(in), pointer my_event)

get the next event in an event group an event belongs to

Parameters
[in]my_eventA pointer of type event.
Returns
ret_event A pointer of type event. The next event in eventgroup

◆ getnexteventisfirst()

recursive logical(c_bool) function, public mtime_events::getnexteventisfirst ( type(event), intent(in), target my_event)

Check if event is first.

Parameters
[in]my_eventA reference of type event.
Returns
ret Logical: true if event is first

◆ getnoofdaysinmonthdatetime()

recursive integer(c_int) function, public mtime_datetime::getnoofdaysinmonthdatetime ( type(datetime), target dt,
integer, optional errno )

Get nod (number of Days) in the month of DateTime.

Routine getNoOfDaysInMonthDateTime returns number of days in the month of DateTime. This routine supports all calendar types.

For eg. the number of days for 2001-10-15T00:00:00.000 will be 31 for Gregorian Calendar. Similarly, this value will be 30 for Calendar of type 360 day-Calendar.

Parameters
[in]dtA pointer to type datetime.
Returns
nod Integer value of nod. The value depends on the month and the calendar type. Zero indicates error.
Parameters
[out]errnooptional, error message

◆ getnoofdaysinyeardatetime()

recursive integer(c_int) function, public mtime_datetime::getnoofdaysinyeardatetime ( type(datetime), target dt,
integer, optional errno )

Get number of days in the Year of DateTime.

Routine getNoOfDaysInYearDateTime returns number of days in the Year of DateTime. This routine supports all calendar types.

Number of days returned will depend on the calendar type and if applicable, leap v/s non leap year.

Parameters
[in]dtA pointer to type datetime.
Returns
nod Integer value of nod. The value depends on the year and the calendar type. Zero indicates error.
Parameters
[out]errnooptional, error message

◆ getnoofsecondselapsedindaydatetime()

recursive integer(c_int) function, public mtime_datetime::getnoofsecondselapsedindaydatetime ( type(datetime), target dt,
integer, optional errno )

Get number of seconds elapsed in the day of DateTime.

Parameters
[in]dtA pointer to type datetime.
Returns
no_of_seconds int value of no_of_seconds. -1 indicates error.
Parameters
[out]errnooptional, error message

◆ getnoofsecondselapsedinmonthdatetime()

recursive integer(c_int64_t) function, public mtime_datetime::getnoofsecondselapsedinmonthdatetime ( type(datetime), target dt,
integer, optional errno )

Get number of seconds elapsed in the month of DateTime.

Parameters
[in]dtA pointer to type datetime.
Returns
no_of_seconds int(i8) value of no_of_seconds. -1 indicates error.
Parameters
[out]errnooptional, error message

◆ getptstringfromhours()

recursive subroutine, public mtime_timedelta::getptstringfromhours ( integer(c_int64_t) h,
character(len=*) string,
integer, optional errno )

Return a PT String corresponding to arbitrary number of Hours.

getPTStringFromHours() translates hour values to ISO 8601 compliant timedelta string. Conversion of h >= 24 and ms <= -24 not supported.

Parameters
[in]hAn int64_t value to be translated.
[out]stringTranslated string is written here.

◆ getptstringfromminutes()

recursive subroutine, public mtime_timedelta::getptstringfromminutes ( integer(c_int64_t) m,
character(len=*) string,
integer, optional errno )

Return a PT String corresponding to arbitrary number of minutes.

getPTStringFromMinutes() translates minutes values to ISO 8601 compliant timedelta string. Conversion of m >= 1440 and m <= -1440 not supported.

Parameters
[in]mAn int64_t value to be translated.
[out]stringTranslated string is written here.

◆ getptstringfromms()

recursive subroutine, public mtime_timedelta::getptstringfromms ( integer(c_int64_t), intent(in) ms,
character(len=*) string,
integer, optional errno )

Return a PT String corresponding to arbitrary number of milliseconds.

getPTStringFromMS() translates ms values to ISO 8601 compliant timedelta string. Conversion of ms >= 86400000 and ms <= -86400000 not supported.

Parameters
[in]msAn int64_t value to be translated.
[out]stringTranslated string is written here.

◆ getrepetitions()

recursive integer function, public mtime_utilities::getrepetitions ( character(len=*), intent(in) repetitionstring)

Extract number of repetitions from repetition string part.

Parameters
[in]repetitionStringA repetition string starting with 'R'. A string literal can be accepted.
Returns
r An int representing the number of repetitions.

◆ gettimedeltafromdate() [1/2]

recursive type(timedelta) function, target, public mtime_timedelta::gettimedeltafromdate ( type(date), intent(in), target op1,
type(date), intent(in), target op2 )

Get the TimeDelta between two Dates op1 and op2 as (op1-op22).

Routine getTimeDeltaFromDate 'subtracts' two Dates and returns the TimeDelta between them. Internally, Dates are converted to DateTimes and then delta is calculated using getTimeDeltaFromDateTime().

This routine handles all supported Calendar types; i.e. the translation from Calendar date to Julian date and conversion from Julian Delta to normal TimeDetla is Calendar-type dependent. For eg. for Calendar type Gregorian, the TimeDelta between 2001-02-01 and 2001-01-01 will be 1 month. Similarly, for Calendar of type 360-Day-Calendar, the TimeDelta will be 1 month. It must be noted however, that the two dates differ by 31 and 30 days respectively.

Parameters
op1A pointer to type date.
op2A pointer to type date.
Returns
ret A pointer to TimeDelta containing the result of subtraction.

◆ gettimedeltafromdate() [2/2]

recursive type(timedelta) function, target mtime_timedelta::operator(-)::gettimedeltafromdate ( type(date), intent(in), target op1,
type(date), intent(in), target op2 )

Get the TimeDelta between two Dates op1 and op2 as (op1-op22).

Routine getTimeDeltaFromDate 'subtracts' two Dates and returns the TimeDelta between them. Internally, Dates are converted to DateTimes and then delta is calculated using getTimeDeltaFromDateTime().

This routine handles all supported Calendar types; i.e. the translation from Calendar date to Julian date and conversion from Julian Delta to normal TimeDetla is Calendar-type dependent. For eg. for Calendar type Gregorian, the TimeDelta between 2001-02-01 and 2001-01-01 will be 1 month. Similarly, for Calendar of type 360-Day-Calendar, the TimeDelta will be 1 month. It must be noted however, that the two dates differ by 31 and 30 days respectively.

Parameters
op1A pointer to type date.
op2A pointer to type date.
Returns
ret A pointer to TimeDelta containing the result of subtraction.

◆ gettimedeltafromdatetime() [1/2]

recursive type(timedelta) function, target, public mtime_timedelta::gettimedeltafromdatetime ( type(datetime), intent(in), target op1,
type(datetime), intent(in), target op2 )

Get the TimeDelta between two DateTimes op1 and op2 as (op1-op2).

Routine getTimeDeltaFromDateTime 'subtracts' two DateTime's and returns the TimeDelta between them. Each datetime is converted to an equivalent Julian Date. Subtraction is then performed on Julian axis. The "Julian delta" is finally converted back to normal calendar delta.

This routine handles all supported Calendar types; i.e. the translation from Calendar date to Julian date and conversion from Julian Delta to normal TimeDetla is Calendar-type dependent. For eg. for Calendar type Gregorian, the TimeDelta between 2001-02-01T00:00:00.000 and 2001-01-01T00:00:00.000 will be 1 month. Similarly, for Calendar of type 360-Day-Calendar, the TimeDelta will be 1 month. It must be noted however, that the two dates differ by 31 and 30 days respectively.

Parameters
op1A pointer to type datetime.
op2A pointer to type datetime.
Returns
ret A pointer to TimeDelta containing the result of subtraction.

◆ gettimedeltafromdatetime() [2/2]

recursive type(timedelta) function, target mtime_timedelta::operator(-)::gettimedeltafromdatetime ( type(datetime), intent(in), target op1,
type(datetime), intent(in), target op2 )

Get the TimeDelta between two DateTimes op1 and op2 as (op1-op2).

Routine getTimeDeltaFromDateTime 'subtracts' two DateTime's and returns the TimeDelta between them. Each datetime is converted to an equivalent Julian Date. Subtraction is then performed on Julian axis. The "Julian delta" is finally converted back to normal calendar delta.

This routine handles all supported Calendar types; i.e. the translation from Calendar date to Julian date and conversion from Julian Delta to normal TimeDetla is Calendar-type dependent. For eg. for Calendar type Gregorian, the TimeDelta between 2001-02-01T00:00:00.000 and 2001-01-01T00:00:00.000 will be 1 month. Similarly, for Calendar of type 360-Day-Calendar, the TimeDelta will be 1 month. It must be noted however, that the two dates differ by 31 and 30 days respectively.

Parameters
op1A pointer to type datetime.
op2A pointer to type datetime.
Returns
ret A pointer to TimeDelta containing the result of subtraction.

◆ gettotalmillisecondstimedelta()

recursive integer(c_int64_t) function, public mtime_timedelta::gettotalmillisecondstimedelta ( type(timedelta), intent(in), target td,
type(datetime), intent(in), target dt,
integer, optional errno )

Get total number of milliseconds in timedelta.

Routine getTotalMilliSecondsTimeDelta returns the total number of milliseconds in TimeDelta. Notice that TimeDelta is not uniquely defined but depends on the definition of corresponding DateTime. TimeDelta is first converted to corresponding delta on the Julian axis. Julian delta is finally converted to the correct millisecond value.

Parameters
[in]tdA pointer to type timedelta. Retrieve the number of milliseconds in this TD object.
[in]dtA pointer to type datetime. Reference Datetime for the TD.
[out]errnoOptional, error message
Returns
totalmilliSeconds Integer value of totalmilliSeconds. 0 indicates error.

WARNING: TD 0 is error. If you know your TD is 0, ignore the error flag.

◆ gettotalsecondstimedelta()

recursive integer(c_int64_t) function, public mtime_timedelta::gettotalsecondstimedelta ( type(timedelta), intent(in), target td,
type(datetime), intent(in), target dt,
integer, optional errno )

Get total number of seconds in timedelta.

Routine getTotalSecondsTimeDelta returns the total number of seconds in TimeDelta. Notice that TimeDelta is not uniquely defined but depends on the definition of corresponding DateTime. Internally, number of seconds is calculated by calling the routine getTotalMilliSecondsTimeDelta() and then converting the millisecond value to seconds by dividing it by 1000.

Parameters
[in]tdA pointer to struct _timedelta. Retrieve the number of seconds in this TD object.
[in]dtA pointer to struct _datetime. Reference Datetime for the TD.
[out]errnoOptional, error message
Returns
totalSeconds Integer value of totalSeconds. 0 indicates error.

WARNING: TD 0 is error. If you know your TD is 0, ignore the error flag.

◆ gettriggeredpreviouseventatdatetime()

recursive subroutine, public mtime_events::gettriggeredpreviouseventatdatetime ( type(event), intent(in), target my_event,
type(datetime), intent(out), target my_datetime,
integer, optional errno )

Get the Datetime when 'this' event will be triggered last.

NOTE: If the event was never tiggered, default value of 0-01-01T00:00:00.000 is returned.

Parameters
[in]my_eventA pointer to type event. This is the event being queried.
[out]my_datetimeA variable of type datetime with last-trigger datetime.
[out]errnooptional, error message

◆ gettriggernexteventatdatetime()

recursive subroutine, public mtime_events::gettriggernexteventatdatetime ( type(event), intent(in), target my_event,
type(datetime), intent(in), target my_currentdatetime,
type(datetime), intent(out), target my_datetime,
integer, intent(out), optional errno )

Get the Datetime when 'this' event will be triggered next.

WARNING: The value returned is with-respect-to current_dt and not a true copy of triggerNextEventDateTime in the event data structure.

Parameters
[in]my_eventA variable of type event. This is the event being queried.
[in]my_currentdatetimeA variable of type datetime. The next trigger datetime is copied here.
[out]my_datetimeA variable of type datetime with next-trigger datetime.
[out]errnooptional, error message

◆ iscurrenteventactive()

recursive logical(c_bool) function, public mtime_events::iscurrenteventactive ( type(event), intent(in), pointer my_event,
type(datetime), intent(in), target my_datetime,
type(timedelta), intent(in), optional, pointer plus_slack,
type(timedelta), intent(in), optional, pointer minus_slack )

Check if this event is active by comparing event's trigger time with current_dt.

   The current_dt must lie in event's trigger time

   (subject to optional specified slack: [Trigger_time -
   minus_slack, Trigger_time + plus_slack]. Slacks can be
   NULL. Always inclusive.)

   The lib has no built-in clock but relies on
   isCurrentEventActive(.) being called (polled) from the
   application at fixed intervals.
Parameters
my_eventA pointer to type event. This is the event being tested.
my_datetimeA variable of type datetime. This is the 'current' datetime of the system.
plus_slackA pointer to type timedelta. Events are triggered between [actual_trigger_time, actual_trigger_time + plus_slack]. Sign MUST be '+'
minus_slackA pointer to type timedelta. Events are triggered between [actual_trigger_time - minus_slack, actual_trigger_time]. Sign MUST be '+'
Returns
ret true/false indicating if the event is active.

◆ iseventnextinnextday()

recursive logical(c_bool) function, public mtime_events::iseventnextinnextday ( type(event), intent(in), pointer my_event)

Checks, if next event is on a new day.

Parameters
[in]my_eventA pointer to a type event
Returns
ret Logical: true if next event is on new day

◆ iseventnextinnextmonth()

recursive logical(c_bool) function, public mtime_events::iseventnextinnextmonth ( type(event), intent(in), pointer my_event)

Checks, if next event is in a new month.

Parameters
[in]my_eventA pointer to a type event
Returns
ret Logical: true if next event is in a new month

◆ iseventnextinnextyear()

recursive logical(c_bool) function, public mtime_events::iseventnextinnextyear ( type(event), intent(in), pointer my_event)

Checks, if next event is in a new year.

Parameters
[in]my_eventA pointer to a type event
Returns
ret Logical: true if next event is in a new year

◆ juliandaytostring()

recursive subroutine, public mtime_julianday::juliandaytostring ( type(julianday), pointer my_julianday,
character(len=max_julianday_str_len), intent(out) string,
integer, optional errno )

get Julian day as a string.

Parameters
[in]my_juliandaya pointer to type(julianday). The Julian day to be converted to a string
[out]stringthe Julian day verbose
[out]errnooptional, error message

◆ modulotimedelta()

recursive integer(c_int64_t) function, public mtime_timedelta::modulotimedelta ( type(timedelta), intent(in), target a,
type(timedelta), intent(in), target p,
integer(c_int64_t), intent(out), target quot )

Returns modulo(a,p) and the quotient.

Parameters
[in]aA pointer to type timedelta.
[in]pA pointer to type timedelta.
[out]quotThe quotient of a divided by p.
Returns
rem modulo(a, p)

◆ newdatefromconstructandcopy()

recursive type(date) function, pointer mtime_date::newdate::newdatefromconstructandcopy ( type(date), target src,
integer, optional errno )

construct a new date from an existing by construct and copy

Parameters
[in]srca pointer of type(date)
[out]errnooptional, error message
Returns
ret_date a pointer of type(date)

◆ newdatefromraw()

recursive type(date) function, pointer mtime_date::newdate::newdatefromraw ( integer(c_int), intent(in) year,
integer(c_int), intent(in) month,
integer(c_int), intent(in) day,
integer, optional errno )

construct a new date from raw date

Parameters
[in]yearthe year
[in]monththe month
[in]daythe day
[out]errnooptional, error message
Returns
ret_date a pointer of type(date)

◆ newdatefromraw_yi8()

recursive type(date) function, pointer mtime_date::newdate::newdatefromraw_yi8 ( integer(c_int64_t), intent(in) year,
integer(c_int), intent(in) month,
integer(c_int), intent(in) day,
integer, optional errno )

construct a new date from raw date

Parameters
[in]yearthe year
[in]monththe month
[in]daythe day
[out]errnooptional, error message
Returns
ret_date a pointer of type(date)

◆ newdatefromstring()

recursive type(date) function, pointer mtime_date::newdate::newdatefromstring ( character(len=*), intent(in) string,
integer, optional errno )

construct a new date

Parameters
[in]stringan ISO 8601 conforming date string
[out]errnooptional, error message
Returns
ret_date a pointer of type(date)

◆ newjulianday()

recursive type(julianday) function, pointer, public mtime_julianday::newjulianday ( integer(c_int64_t), intent(in) day,
integer(c_int64_t), intent(in) ms,
integer, optional errno )

construct a new Julian date

Parameters
[in]daythe Julian day
[in]msan integer denoting the actual milli seconds of a day
[out]errnooptional, error message
Returns
ret_julianday a pointer of type(julianday)

◆ removeeventfromeventgroup()

recursive logical function, public mtime_eventgroups::removeeventfromeventgroup ( character(len=*), intent(in) my_name,
type(eventgroup), intent(inout), pointer my_eventgroup )

Remove event from eventgroup. CRITICAL: Also, deallocate the event.

Parameters
my_nameThe name of event to be removed.
my_eventgroupA pointer to type eventgroup. The eventgroup to which this event belongs.
Returns
ret true/false indicating success or failure of removal.

◆ replacedate()

recursive subroutine, public mtime_date::replacedate ( type(date), intent(inout), target dest,
type(date), intent(in), target src,
integer, optional errno )

repace an existing date by a given one

Parameters
[in]srca pointer of type(date)
[out]desta pointer of type(date)
[out]errnooptional, error message

◆ replacetime()

recursive subroutine, public mtime_time::replacetime ( type(time), intent(inout), target dest,
type(time), intent(in), target src,
integer, optional errno )

COPY a time object.

Routine replaceTime copies the contents of source Time into a Destination Time object.

Parameters
[in]srcA pointer to type time. Copy "FROM" time object.
[out]destA pointer to type time. Copy "TO" time object.
[out]errnooptional, error message

◆ splitrepetitionstring()

recursive subroutine, public mtime_utilities::splitrepetitionstring ( character(len=*), intent(in) recurringtimeinterval,
character(len=*), intent(out) repetitor,
character(len=*), intent(out) start,
character(len=*), intent(out) end,
character(len=*), intent(out) duration,
logical, intent(out) lrepetitor,
logical, intent(out) lstart,
logical, intent(out) lend,
logical, intent(out) lduration )

Split ISO 8601:2004 repeated time interval strings into base components.

Parameters
[in]recurringTimeIntervalThe string should contain an ISO 8601:2004 repeated time interval string. A string literal can be accepted.
[out]repetitorContains the repetitor part of the input string.
[out]startContains the start date part of the input string.
[out]endContains the end date part of the input string.
[out]durationContains the duration part of the input string.
[out]lrepetitorLogical: true, if repetion is available
[out]lstartLogical: true, if start is available
[out]lendLogical: true, if end is available
[out]ldurationLogical: true, if duration is available

◆ timedeltatostring()

recursive subroutine, public mtime_timedelta::timedeltatostring ( type(timedelta), target my_timedelta,
character(len=max_timedelta_str_len) string,
integer, optional errno )

Get TimeDelta as an extended string.

timedeltaToString returns a string in IS08601 compliant (and extended) format.

Parameters
[in]my_timedeltaA pointer to type timedelta. The timedelta to be converted to string.
[out]stringString where timedelta is to be written.
[out]errnooptional, error message

◆ timetoposixstring()

recursive subroutine, public mtime_time::timetoposixstring ( type(time), pointer my_time,
character(len=max_time_str_len) string,
character(len=32) fmtstr,
integer, optional errno )

Get time as a Posix formated string.

Parameters
[in]my_timeA pointer to type time. The time to be converted to string.
[out]stringString where time is to be written.
[in]fmtstrDesired Format string. CRITICAL: Inappropriate fmt string will cause dump.
[out]errnooptional, error message

◆ timetostring()

recursive subroutine, public mtime_time::timetostring ( type(time), pointer my_time,
character(len=max_time_str_len) string,
integer, optional errno )

Get time as an extended string.

timetoString returns a string in IS08601 compliant (and extended) format.

Parameters
[in]my_timeA pointer to type time. The time to be converted to string.
[out]stringString where time is to be written.
[out]errnooptional, error message