Botan 3.6.1
Crypto and TLS for C&
|
#include <calendar.h>
Public Member Functions | |
calendar_point (const std::chrono::system_clock::time_point &time_point) | |
calendar_point (uint32_t y, uint32_t mon, uint32_t d, uint32_t h, uint32_t min, uint32_t sec) | |
uint32_t | day () const |
uint32_t | hour () const |
uint32_t | minutes () const |
uint32_t | month () const |
uint32_t | seconds () const |
std::chrono::system_clock::time_point | to_std_timepoint () const |
std::string | to_string () const |
uint32_t | year () const |
Struct representing a particular date and time
Definition at line 21 of file calendar.h.
|
inline |
Initialize a calendar_point
y | the year |
mon | the month |
d | the day |
h | the hour |
min | the minute |
sec | the second |
Definition at line 52 of file calendar.h.
Botan::calendar_point::calendar_point | ( | const std::chrono::system_clock::time_point & | time_point | ) |
Convert a time_point to a calendar_point
time_point | a time point from the system clock |
Definition at line 100 of file calendar.cpp.
|
inline |
The day of the month, 1 through 31 (or 28 or 30 based on month
Definition at line 30 of file calendar.h.
Referenced by Botan::ASN1_Time::ASN1_Time(), to_std_timepoint(), and to_string().
|
inline |
Hour in 24-hour form, 0 to 23
Definition at line 33 of file calendar.h.
Referenced by Botan::ASN1_Time::ASN1_Time(), to_std_timepoint(), and to_string().
|
inline |
Minutes in the hour, 0 to 60
Definition at line 36 of file calendar.h.
Referenced by Botan::ASN1_Time::ASN1_Time(), to_std_timepoint(), and to_string().
|
inline |
The month, 1 through 12 for Jan to Dec
Definition at line 27 of file calendar.h.
Referenced by Botan::ASN1_Time::ASN1_Time(), to_std_timepoint(), and to_string().
|
inline |
Seconds in the minute, 0 to 60, but might be slightly larger to deal with leap seconds on some systems
Definition at line 41 of file calendar.h.
Referenced by Botan::ASN1_Time::ASN1_Time(), to_std_timepoint(), and to_string().
std::chrono::system_clock::time_point Botan::calendar_point::to_std_timepoint | ( | ) | const |
Returns an STL timepoint object
Definition at line 59 of file calendar.cpp.
References day(), hour(), minutes(), month(), seconds(), and year().
Referenced by Botan::ASN1_Time::to_std_timepoint().
std::string Botan::calendar_point::to_string | ( | ) | const |
Returns a human readable string of the struct's components. Formatting might change over time. Currently it is RFC339 'iso-date-time'.
Definition at line 91 of file calendar.cpp.
References day(), hour(), minutes(), month(), seconds(), and year().
|
inline |
The year
Definition at line 24 of file calendar.h.
Referenced by Botan::ASN1_Time::ASN1_Time(), to_std_timepoint(), and to_string().