The ts_cal_range() function

The ts_cal_range() function returns a list of time stamps containing all valid timepoints in a calendar between two time stamps (inclusive of the specified time stamps).

Syntax

MI_COLLECTION *
ts_cal_range (MI_CONNECTION *conn, 
              mi_string     *cal_name, 
              mi_datetime   *begin_stamp,
              mi_datetime   *end_stamp)
conn
A valid connection.
cal_name
The name of the calendar.
begin_stamp
The begin point of the range. It must not be earlier than the calendar origin.
end_stamp
The end point of the range.

Description

This function is useful if you must print out the time stamps of a series of regular time series elements. If the range is known, getting an array of all of the time stamps is more efficient than using ts_time() on each element.

The caller is responsible for freeing the result of this function.

The equivalent SQL function is CalRange.

Returns

A list of time stamps.