-
Notifications
You must be signed in to change notification settings - Fork 0
calendar.h ~ class Interval
Baptiste Thémine edited this page Sep 8, 2020
·
2 revisions
class Interval { /* declarations */ }
Defines a container class of a range of date/time representations.
- (Mandatory)
<cstdio>
,<cstdlib>
,<iostream>
,<stdexcept>
,<JLC/debug.h>
and<JLC/functions.h>
must be included. - (Optional)
<cstring>
enables character sequence functions.
Name | Description |
---|---|
(constructor) | Constructs a new interval. |
(destructor) | Destroys an interval. |
is_empty | Returns true if interval equals interval::empty. |
is_singleton | Returns true if interval is a singleton. |
contains | Returns true if interval contains the specified date. |
to_clock | Returns interval's internal clock. |
ISO | Returns interval as ISO 8601 string representation. |
begin | Returns interval's begin date. |
end | Returns interval's end date. |
convex_union | Returns the convex union of two intervals. |
intersect | Returns the intersection of two intervals. |
swap | Swaps the contents. |
Name | Description |
---|---|
operator bool | Returns true if interval is not empty. |
operator clock_type | Returns interval's internal clock. |
operator= | Assigns an interval. |
operator== operator!= |
Compares two intervals. |
operator>> operator<< |
I/O stream operators for intervals. |