IfxMonthSpan structure

An IfxMonthSpan represents an offset of a particular number of months and years. A positive IfxMonthSpan represents an offset forward in time and a negative IfxMonthSpan represents an offset backward in time. An IfxMonthSpan can hold values from -11 999 999 999 months to 11 999 999 999 months (11 999 999 999 months = 999 999 999 years and 11 months).

An IfxMonthSpan is treated as if it were made up of a separate value for years and months.

You can create an IfxMonthSpan that uses only years or only months. This is allowed to mimic the behavior of the database server's INTERVAL data type. It does not save any space in memory to use only one time unit.

The largest time unit of an IfxMonthSpan is called the start time unit. The smallest time unit of an IfxMonthSpan is called the end time unit. The start time unit and the end time unit together are called the range of the IfxMonthSpan.

Example: If an IfxMonthSpan uses years and months, start time unit is year, the end time unit is month, and the range is year to month. If only months are used then the range is month to month and both the start time unit and end time unit are month.

When creating an IfxMonthSpan you specify time units using the members of the enumeration IfxTimeUnit enumeration. For details about this enumeration see IfxTimeUnit enumeration.