Go to the source code of this file.
Classes | |
| struct | Timestamp |
| Class or struct representing an exact point in time. More... | |
Functions | |
| struct Timestamp | Timestamp_from_time_t (const time_t time) |
| Create a new Timestamp based on a "time_t" value (from C's time library). More... | |
| void | Timestamp_ptr_from_time_t (struct Timestamp *const result, const time_t time) |
| Create a new Timestamp based on a "time_t" value (from C's time library). More... | |
| struct Timestamp | Timestamp_from_struct_tm (const struct tm tm, const struct TimeDelta *const time_zone_offset) |
| Create a new Timestamp based on a "struct tm" value (from C's time library) in a certain time zone. More... | |
| void | Timestamp_ptr_from_struct_tm (struct Timestamp *const result, const struct tm tm, const struct TimeDelta *const time_zone_offset) |
| Create a new Timestamp based on a "struct tm" value (from C's time library) in a certain time zone. More... | |
| struct Timestamp | Timestamp_from_struct_tm_utc (const struct tm tm) |
| Create a new Timestamp based on a "struct tm" value (from C's time library) in Coordinated Universal Time. More... | |
| void | Timestamp_ptr_from_struct_tm_utc (struct Timestamp *const result, const struct tm tm) |
| Create a new Timestamp based on a "struct tm" value (from C's time library) in Coordinated Universal Time. More... | |
| struct Timestamp | Timestamp_from_struct_tm_local (const struct tm tm) |
| Create a new Timestamp based on a "struct tm" value (from C's time library) in the system's current local time zone. More... | |
| void | Timestamp_ptr_from_struct_tm_local (struct Timestamp *const result, const struct tm tm) |
| Create a new Timestamp based on a "struct tm" value (from C's time library) in the system's current local time zone. More... | |
| struct Timestamp | Timestamp_create (const struct Date *const date, const struct ClockTime *const clock_time, const struct TimeDelta *const time_zone_offset) |
| Create a new Timestamp based on a Date and ClockTime in a certain time zone. More... | |
| void | Timestamp_ptr_create (struct Timestamp *const result, const struct Date *const date, const struct ClockTime *const clock_time, const struct TimeDelta *const time_zone_offset) |
| Create a new Timestamp based on a Date and ClockTime in a certain time zone. More... | |
| struct Timestamp | Timestamp_create_utc (const struct Date *const date, const struct ClockTime *const clock_time) |
| Create a new Timestamp based on a Date and ClockTime in Coordinated Universal Time. More... | |
| void | Timestamp_ptr_create_utc (struct Timestamp *const result, const struct Date *const date, const struct ClockTime *const clock_time) |
| Create a new Timestamp based on a Date and ClockTime in Coordinated Universal Time. More... | |
| struct Timestamp | Timestamp_create_local (const struct Date *const date, const struct ClockTime *const clock_time) |
| Create a new Timestamp based on a Date and ClockTime in the system's current local time zone. More... | |
| void | Timestamp_ptr_create_local (struct Timestamp *const result, const struct Date *const date, const struct ClockTime *const clock_time) |
| Create a new Timestamp based on a Date and ClockTime in the system's current local time zone. More... | |
| struct Timestamp | Timestamp_now (void) |
| Create a new Timestamp representing the exact time right now. More... | |
| void | Timestamp_ptr_now (struct Timestamp *const result) |
| Create a new Timestamp representing the exact time right now. More... | |
| struct Timestamp | Timestamp_epoch (void) |
| Create a new Timestamp representing the UNIX epoch (Jan. More... | |
| void | Timestamp_ptr_epoch (struct Timestamp *const result) |
| Create a new Timestamp representing the UNIX epoch (Jan. More... | |
| time_t | Timestamp_get_time_t (const struct Timestamp *const self) |
| Convert a Timestamp to a "time_t" (from C's time library). More... | |
| struct tm | Timestamp_get_struct_tm (const struct Timestamp *const self, const struct TimeDelta *const time_zone_offset) |
| Convert a Timestamp to a "struct tm" (from C's time library) in a certain time zone (represented by an offset from UTC). More... | |
| struct tm | Timestamp_get_struct_tm_utc (const struct Timestamp *const self) |
| Convert a Timestamp to a "struct tm" (from C's time library) in Coordinated Universal Time. More... | |
| struct tm | Timestamp_get_struct_tm_local (const struct Timestamp *const self) |
| Convert a Timestamp to a "struct tm" (from C's time library) in the system's current local time zone. More... | |
| struct Date | Timestamp_get_date (const struct Timestamp *const self, const struct TimeDelta *const time_zone_offset) |
| Get the Date component of a Timestamp in a certain time zone (represented by an offset from UTC). More... | |
| struct Date | Timestamp_get_date_utc (const struct Timestamp *const self) |
| Get the Date component of a Timestamp in Coordinated Universal Time. More... | |
| struct Date | Timestamp_get_date_local (const struct Timestamp *const self) |
| Get the Date component of a Timestamp in the system's current local time zone. More... | |
| struct ClockTime | Timestamp_get_clock_time (const struct Timestamp *const self, const struct TimeDelta *const time_zone_offset) |
| Get the ClockTime component of a Timestamp in a certain time zone (represented by an offset from UTC). More... | |
| struct ClockTime | Timestamp_get_clock_time_utc (const struct Timestamp *const self) |
| Get the ClockTime component of a Timestamp in Coordinated Universal Time. More... | |
| struct ClockTime | Timestamp_get_clock_time_local (const struct Timestamp *const self) |
| Get the ClockTime component of a Timestamp in the system's current local time zone. More... | |
| struct TimeDelta | Timestamp_difference (const struct Timestamp *const self, const struct Timestamp *const other) |
| Get the difference between two Timestamp instances as a TimeDelta. More... | |
| struct TimeDelta | Timestamp_absolute_difference (const struct Timestamp *const self, const struct Timestamp *const other) |
| Get the absolute difference between two Timestamp instances as a TimeDelta. More... | |
| void | Timestamp_add_TimeDelta (struct Timestamp *const self, const struct TimeDelta *const delta) |
| Add a TimeDelta to a Timestamp. More... | |
| void | Timestamp_add_DayDelta (struct Timestamp *const self, const struct DayDelta *const delta) |
| Add a DayDelta to a Timestamp. More... | |
| void | Timestamp_add_MonthDelta (struct Timestamp *const self, const struct MonthDelta *const delta) |
| Add a MonthDelta to a Timestamp. More... | |
| void | Timestamp_subtract_TimeDelta (struct Timestamp *const self, const struct TimeDelta *const delta) |
| Subtract a TimeDelta from a Timestamp. More... | |
| void | Timestamp_subtract_DayDelta (struct Timestamp *const self, const struct DayDelta *const delta) |
| Subtract a DayDelta from a Timestamp. More... | |
| void | Timestamp_subtract_MonthDelta (struct Timestamp *const self, const struct MonthDelta *const delta) |
| Subtract a MonthDelta from a Timestamp. More... | |
| short | Timestamp_compare (const struct Timestamp *const lhs, const struct Timestamp *const rhs) |
| Compare two Timestamp instances. More... | |
| present_bool | Timestamp_equal (const struct Timestamp *const lhs, const struct Timestamp *const rhs) |
| Determine whether two Timestamp instances represent the exact same point in time (lhs == rhs). More... | |
| present_bool | Timestamp_less_than (const struct Timestamp *const lhs, const struct Timestamp *const rhs) |
| Determine whether a Timestamp occurs earlier than another Timestamp (lhs < rhs). More... | |
| present_bool | Timestamp_less_than_or_equal (const struct Timestamp *const lhs, const struct Timestamp *const rhs) |
| Determine whether a Timestamp occurs earlier than or at the same time as another Timestamp (lhs <= rhs). More... | |
| present_bool | Timestamp_greater_than (const struct Timestamp *const lhs, const struct Timestamp *const rhs) |
| Determine whether a Timestamp occurs later than another Timestamp (lhs > rhs). More... | |
| present_bool | Timestamp_greater_than_or_equal (const struct Timestamp *const lhs, const struct Timestamp *const rhs) |
| Determine whether a Timestamp occurs later than or at the same time as another Timestamp (lhs >= rhs). More... | |
| struct Timestamp Timestamp_from_time_t | ( | const time_t | time | ) |
Create a new Timestamp based on a "time_t" value (from C's time library).
| time | The "time_t" value representing the timestamp. |
| void Timestamp_ptr_from_time_t | ( | struct Timestamp *const | result, |
| const time_t | time | ||
| ) |
| struct Timestamp Timestamp_from_struct_tm | ( | const struct tm | tm, |
| const struct TimeDelta *const | time_zone_offset | ||
| ) |
Create a new Timestamp based on a "struct tm" value (from C's time library) in a certain time zone.
| tm | The "struct tm" value representing the date and time. |
| time_zone_offset | The time zone offset (from UTC) used to interpret tm. |
| struct Timestamp Timestamp_from_struct_tm_utc | ( | const struct tm | tm | ) |
Create a new Timestamp based on a "struct tm" value (from C's time library) in Coordinated Universal Time.
| tm | The "struct tm" value representing the date and time. |
| void Timestamp_ptr_from_struct_tm_utc | ( | struct Timestamp *const | result, |
| const struct tm | tm | ||
| ) |
| struct Timestamp Timestamp_from_struct_tm_local | ( | const struct tm | tm | ) |
Create a new Timestamp based on a "struct tm" value (from C's time library) in the system's current local time zone.
| tm | The "struct tm" value representing the date and time. |
| void Timestamp_ptr_from_struct_tm_local | ( | struct Timestamp *const | result, |
| const struct tm | tm | ||
| ) |
| struct Timestamp Timestamp_create | ( | const struct Date *const | date, |
| const struct ClockTime *const | clock_time, | ||
| const struct TimeDelta *const | time_zone_offset | ||
| ) |
Create a new Timestamp based on a Date and ClockTime in a certain time zone.
Future modifications to the original Date and ClockTime do NOT affect the new Timestamp.
If the Date or ClockTime is invalid, the Timestamp will have has_error and errors set.
has_error field on the returned struct is true.If has_error is true, then at least one of the fields in the errors struct will also be true.
| void Timestamp_ptr_create | ( | struct Timestamp *const | result, |
| const struct Date *const | date, | ||
| const struct ClockTime *const | clock_time, | ||
| const struct TimeDelta *const | time_zone_offset | ||
| ) |
Create a new Timestamp based on a Date and ClockTime in a certain time zone.
Future modifications to the original Date and ClockTime do NOT affect the new Timestamp.
If the Date or ClockTime is invalid, the Timestamp will have has_error and errors set.
has_error field on the returned struct is true.If has_error is true, then at least one of the fields in the errors struct will also be true.
| struct Timestamp Timestamp_create_utc | ( | const struct Date *const | date, |
| const struct ClockTime *const | clock_time | ||
| ) |
Create a new Timestamp based on a Date and ClockTime in Coordinated Universal Time.
Future modifications to the original Date and ClockTime do NOT affect the new Timestamp.
If the Date or ClockTime is invalid, the Timestamp will have has_error and errors set.
has_error field on the returned struct is true.If has_error is true, then at least one of the fields in the errors struct will also be true.
| void Timestamp_ptr_create_utc | ( | struct Timestamp *const | result, |
| const struct Date *const | date, | ||
| const struct ClockTime *const | clock_time | ||
| ) |
Create a new Timestamp based on a Date and ClockTime in Coordinated Universal Time.
Future modifications to the original Date and ClockTime do NOT affect the new Timestamp.
If the Date or ClockTime is invalid, the Timestamp will have has_error and errors set.
has_error field on the returned struct is true.If has_error is true, then at least one of the fields in the errors struct will also be true.
| struct Timestamp Timestamp_create_local | ( | const struct Date *const | date, |
| const struct ClockTime *const | clock_time | ||
| ) |
Create a new Timestamp based on a Date and ClockTime in the system's current local time zone.
Future modifications to the original Date and ClockTime do NOT affect the new Timestamp.
If the Date or ClockTime is invalid, the Timestamp will have has_error and errors set.
has_error field on the returned struct is true.If has_error is true, then at least one of the fields in the errors struct will also be true.
| void Timestamp_ptr_create_local | ( | struct Timestamp *const | result, |
| const struct Date *const | date, | ||
| const struct ClockTime *const | clock_time | ||
| ) |
Create a new Timestamp based on a Date and ClockTime in the system's current local time zone.
Future modifications to the original Date and ClockTime do NOT affect the new Timestamp.
If the Date or ClockTime is invalid, the Timestamp will have has_error and errors set.
has_error field on the returned struct is true.If has_error is true, then at least one of the fields in the errors struct will also be true.
| struct Timestamp Timestamp_now | ( | void | ) |
| void Timestamp_ptr_now | ( | struct Timestamp *const | result | ) |
Create a new Timestamp representing the exact time right now.
On most POSIX systems, this will return a Timestamp with up to nanosecond precision (depending on the maximum precision of the machine). On other systems, the Timestamp will only be to the nearest second.
| [out] | result | A pointer to a struct Timestamp for the result. |
| struct Timestamp Timestamp_epoch | ( | void | ) |
Create a new Timestamp representing the UNIX epoch (Jan.
1, 1970 00:00:00 UTC).
| void Timestamp_ptr_epoch | ( | struct Timestamp *const | result | ) |
| time_t Timestamp_get_time_t | ( | const struct Timestamp *const | self | ) |
Convert a Timestamp to a "time_t" (from C's time library).
| struct tm Timestamp_get_struct_tm | ( | const struct Timestamp *const | self, |
| const struct TimeDelta *const | time_zone_offset | ||
| ) |
Convert a Timestamp to a "struct tm" (from C's time library) in a certain time zone (represented by an offset from UTC).
| struct tm Timestamp_get_struct_tm_utc | ( | const struct Timestamp *const | self | ) |
Convert a Timestamp to a "struct tm" (from C's time library) in Coordinated Universal Time.
| struct tm Timestamp_get_struct_tm_local | ( | const struct Timestamp *const | self | ) |
Convert a Timestamp to a "struct tm" (from C's time library) in the system's current local time zone.
| void Timestamp_add_MonthDelta | ( | struct Timestamp *const | self, |
| const struct MonthDelta *const | delta | ||
| ) |
Add a MonthDelta to a Timestamp.
| void Timestamp_subtract_MonthDelta | ( | struct Timestamp *const | self, |
| const struct MonthDelta *const | delta | ||
| ) |
Subtract a MonthDelta from a Timestamp.
Compare two Timestamp instances.
| present_bool Timestamp_equal | ( | const struct Timestamp *const | lhs, |
| const struct Timestamp *const | rhs | ||
| ) |
Determine whether two Timestamp instances represent the exact same point in time (lhs == rhs).
| present_bool Timestamp_less_than | ( | const struct Timestamp *const | lhs, |
| const struct Timestamp *const | rhs | ||
| ) |
| present_bool Timestamp_less_than_or_equal | ( | const struct Timestamp *const | lhs, |
| const struct Timestamp *const | rhs | ||
| ) |
| present_bool Timestamp_greater_than | ( | const struct Timestamp *const | lhs, |
| const struct Timestamp *const | rhs | ||
| ) |
| present_bool Timestamp_greater_than_or_equal | ( | const struct Timestamp *const | lhs, |
| const struct Timestamp *const | rhs | ||
| ) |