prg_date_time_window_calculate()
Abstract
Determines start and end times for a specified time interval.
Syntax
prg_date_time_window_calculate (baseline_date_time, offset_intervals, type, start_date_time_ptr, end_date_time_ptr)
| Argument | Type | Description |
|---|---|---|
baseline_date_time |
PrgT_Date |
Base time of interest. |
offset_intervals |
int |
Offset, in number of time intervals. |
type |
PrgT_Date_Interval_Type |
Type of time interval to use; one of the symbolic constants given in Table 1. |
start_date_time_ptr |
PrgT_Date * |
Area to hold the calculated start time of the interval. |
end_date_time_ptr |
PrgT_Date * |
Area to hold the calculated end time of the interval. |
Return Type
PrgT_Compcode
PrgC_Compcode_Success if a time window is successfully calculated; PrgC_Compcode_Failure otherwise.
Header
prg_date.h
Details
Given a baseline time, the interval type, and an offset (negative: past, positive: future, zero: current), this function calculates the start and end of a time window before or after (or including) the baseline time. For example, if offset_intervals is -1 and type is PrgC_Date_Interval_Day, this function returns a time window for the calendar day preceding the day containing the baseline time.