#include <Calendar.hpp>
|
| Calendar () |
|
| Calendar (std::uint16_t year, std::uint16_t month, std::uint16_t day, std::uint16_t hour, std::uint16_t minute, std::uint16_t second) |
|
| Calendar (const iv::time::Timestamp ×tamp) |
|
| Calendar (const iv::types::timestamp ×tamp) |
|
| Calendar (const iv::DateTime &dateTime) |
|
| Calendar (const Calendar &other)=default |
|
| Calendar (Calendar &&other)=default |
|
| ~Calendar ()=default |
|
Calendar & | operator= (const Calendar &other)=default |
|
Calendar & | operator= (Calendar &&other)=default |
|
iv::DateTime | getDateTime () const |
|
void | setDateTime (iv::DateTime dateTime) |
|
std::chrono::time_point< std::chrono::system_clock > | getTimePoint () const |
|
std::string | strTimeAgo (bool isShortForm=false) const |
| Crea el mensaje de hace cuando tiempo marca el objeto Calendar respecto al ahora.
|
|
std::string | strTime (iv::eTimeFormat timeFormat=iv::eTimeFormat::DateAndTime, char dateDelimiter='/', char timeDelimiter=':') const |
| Obtiene el objeto Calendar en representación String.
|
|
bool | parseStr (const std::string &timeStrValue, iv::eTimeFormat timeFormat=iv::eTimeFormat::DateAndTime, char dateDelimiter='/', char timeDelimiter=':') |
| Parses a time string in to Calendar object.
|
|
◆ Calendar() [1/7]
iv::utils::Calendar::Calendar |
( |
| ) |
|
◆ Calendar() [2/7]
iv::utils::Calendar::Calendar |
( |
std::uint16_t | year, |
|
|
std::uint16_t | month, |
|
|
std::uint16_t | day, |
|
|
std::uint16_t | hour, |
|
|
std::uint16_t | minute, |
|
|
std::uint16_t | second ) |
◆ Calendar() [3/7]
◆ Calendar() [4/7]
◆ Calendar() [5/7]
iv::utils::Calendar::Calendar |
( |
const iv::DateTime & | dateTime | ) |
|
|
explicit |
◆ Calendar() [6/7]
iv::utils::Calendar::Calendar |
( |
const Calendar & | other | ) |
|
|
default |
◆ Calendar() [7/7]
iv::utils::Calendar::Calendar |
( |
Calendar && | other | ) |
|
|
default |
◆ ~Calendar()
iv::utils::Calendar::~Calendar |
( |
| ) |
|
|
default |
◆ formattedTimeString()
std::string iv::utils::Calendar::formattedTimeString |
( |
iv::eTimeFormat | timeFormat, |
|
|
char | dateDelimiter, |
|
|
char | timeDelimiter ) |
|
staticprivate |
Obtiene el string para formatear la fecha.
- Parameters
-
timeFormat | Formato de la fecha. |
dateDelimiter | Separador de las fechas. |
timeDelimiter | Separador de las horas. |
- Returns
- String con el formato de la fecha.
- Exceptions
-
MissingCase | if timeFormat is wrong. |
◆ fromTimeInfo()
void iv::utils::Calendar::fromTimeInfo |
( |
const std::tm & | timeInfo | ) |
|
|
private |
◆ getDateTime()
◆ getTimePoint()
std::chrono::time_point< std::chrono::system_clock > iv::utils::Calendar::getTimePoint |
( |
| ) |
const |
|
nodiscard |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ parseStr()
Parses a time string in to Calendar object.
- Parameters
-
timeStrValue | String time. |
timeFormat | Time format. |
dateDelimiter | Separador de las fechas. |
timeDelimiter | Separador de las horas. |
- Returns
- True if the string was parsed correctly, false otherwise (calendar will be initialized with 0).
◆ setDateTime()
void iv::utils::Calendar::setDateTime |
( |
iv::DateTime | dateTime | ) |
|
◆ strTime()
Obtiene el objeto Calendar en representación String.
- Parameters
-
timeFormat | Formato de la fecha. |
dateDelimiter | Separador de las fechas. |
timeDelimiter | Separador de las horas. |
- Returns
- String representando la fecha.
- Exceptions
-
MissingCase | if timeFormat is wrong. |
◆ strTimeAgo()
std::string iv::utils::Calendar::strTimeAgo |
( |
bool | isShortForm = false | ) |
const |
|
nodiscard |
Crea el mensaje de hace cuando tiempo marca el objeto Calendar respecto al ahora.
- Parameters
-
isShortForm | Si la unidad de tiempo debe ser short form. |
- Returns
- STRING con el mensaje de hace cuanto tiempo marca el objeto Calendar.
◆ toTimeInfo()
std::tm iv::utils::Calendar::toTimeInfo |
( |
| ) |
const |
|
nodiscardprivate |
◆ m_dateTime
The documentation for this class was generated from the following files: