userver: storages::mysql::Date Class Reference
Loading...
Searching...
No Matches
storages::mysql::Date Class Referencefinal

#include </data/code/userver/mysql/include/userver/storages/mysql/dates.hpp>

Detailed Description

a class that represent MySQL DATE type.

Definition at line 13 of file dates.hpp.

Public Member Functions

 Date ()
 constructs a DATE with year/month/day being zero.
 
 Date (std::uint32_t year, std::uint32_t month, std::uint32_t day)
 constructs a DATE from provided year, month and day.
 
 Date (std::chrono::system_clock::time_point tp)
 constructs a DATE from provided timepoint.
 
std::chrono::system_clock::time_point ToTimePoint () const
 converts the DATE to timepoint in UTC time zone. throws if stored date is out of timepoint range.
 
std::uint32_t GetYear () const noexcept
 Returns the year part of the date.
 
std::uint32_t GetMonth () const noexcept
 Returns the month part of the date.
 
std::uint32_t GetDay () const noexcept
 Returns the day part of the date.
 
bool operator== (const Date &other) const noexcept
 

The documentation for this class was generated from the following file: