-
Notifications
You must be signed in to change notification settings - Fork 0
calendar.h ~ namespace calendar
Baptiste Thémine edited this page Aug 6, 2020
·
4 revisions
namespace calendar { /* declarations */ }
Defines the namespace calendar
and provides types, constants, exceptions and utility functions for calendar algorithm.
- (Mandatory)
<cstdio>
,<cstdlib>
,<iostream>
,<stdexcept>
,<JLC/debug.h>
and<JLC/functions.h>
must be included. - (Optional)
<cstring>
and<ctime>
enables character sequence and local time functions.
Name | Description |
---|---|
clock_type | Defines integer type to store raw time information. |
datetime_type | Defines structure to store human-readable date/time representation. |
duration_type | Defines structure to store human-readable duration representation. |
year_type | Defines integer type to store the representation of Gregorian years. |
month_type | Defines integer type to store the representation of months in a year. |
week_of_year_type | Defines integer type to store the representation of weeks in a year. |
week_of_month_type | Defines integer type to store the representation of weeks in a month. |
day_of_year_type | Defines integer type to store the representation of days in a year. |
day_of_month_type | Defines integer type to store the representation of days in a month. |
day_of_week_type | Defines integer type to store the representation of days of week. |
hour_type | Defines integer type to store the representation of hours in a day. |
minute_type | Defines integer type to store the representation of minutes in an hour. |
second_type | Defines integer type to store the representation of seconds in a minute. |
milli_type | Defines integer type to store the representation of milliseconds in a second. |
timezone_type | Defines integer type to store UTC time zone offset. |
Name | Description |
---|---|
clock_to_datetime | Converts clock_type to datetime_type. |
clock_to_duration | Converts clock_type to duration_type. |
compare | Compares two datetime_type or duration_type. |
datetime_to_clock | Converts a datetime_type to clock_type. |
duration_to_clock | Converts a duration_type to clock_type. |
divide | Division operation on clock_type. |
equals | Returns true if two datetime_type or duration_type are equal. |
is_date | Returns true if the specified date representation is valid ISO 8601. |
is_datetime | Returns true if the specified date/time representation is valid ISO 8601. |
is_leap_year | Returns true if the specified year is a Gregorian leap year. |
is_nan | Returns true if the specified clock_type equals CLOCK_NAN . |
is_time | Returns true if the specified time representation is valid ISO 8601. |
is_timezone | Returns true if the specified UTC time zone offset is valid ISO 8601. |
make_datetime | Initializes a valid ISO 8601 datetime_type structure. |
make_duration | Initializes a duration_type structure. |
minus | Subtract operation on clock_type and datetime_type. |
modulo | Modulo operation on clock_type. |
multiply | Multiply operation on clock_type and datetime_type. |
operator>> operator<< |
I/O stream operators for calendar types. |
period_to_clock | Converts a period representation to clock_type. |
plus | Sum operation on clock_type and datetime_type. |
timezone_to_clock | Converts a timezone_type to clock_type. |
Name | Description |
---|---|
constants | Contains all calendar constants. |
typenames | Contains all calendar typenames. |
year | Contains year_type. |
month | Contains month_type. |
week_of_year | Contains week_of_year_type. |
week_of_month | Contains week_of_month_type. |
day_of_year | Contains day_of_year_type. |
day_of_month | Contains day_of_month_type. |
day_of_week | Contains day_of_week_type. |
hour | Contains hour_type. |
minute | Contains minute_type. |
second | Contains second_type. |
milli | Contains milli_type. |
timezone | Contains timezone_type. |