AnCH Framework 0.1
Another C++ Hack Framework
 
Loading...
Searching...
No Matches
anch::sql::Date Class Reference

SQL date type. More...

#include <date.hpp>

+ Inheritance diagram for anch::sql::Date:
+ Collaboration diagram for anch::sql::Date:

Public Member Functions

 Date (bool init=true)
 
 Date (const anch::date::Date &date)
 
 Date (const std::time_t &time)
 
 Date (const std::tm *const time)
 
virtual ~Date ()
 
- Public Member Functions inherited from anch::date::Date
 Date (bool init=true)
 
 Date (const std::time_t &time)
 
 Date (const std::tm *const time)
 
 Date (const std::timespec &time)
 
bool after (const Date &date) const noexcept
 
bool before (const Date &date) const noexcept
 
bool equals (const Date &date) const noexcept
 
bool operator> (const Date &date) const noexcept
 
bool operator>= (const Date &date) const noexcept
 
bool operator< (const Date &date) const noexcept
 
bool operator<= (const Date &date) const noexcept
 
bool operator== (const Date &date) const noexcept
 
bool operator!= (const Date &date) const noexcept
 
 operator std::time_t () const noexcept
 
 operator std::tm () const noexcept
 
 operator std::timespec () const noexcept
 

Additional Inherited Members

- Protected Attributes inherited from anch::date::Date
std::int64_t _timestamp
 
int32_t _years = 0
 
uint16_t _months = 0
 
uint16_t _ydays = 0
 
uint16_t _mdays = 0
 
uint16_t _wdays = 0
 
uint16_t _hours = 0
 
uint16_t _minutes = 0
 
uint16_t _seconds = 0
 
uint16_t _milliseconds = 0
 
uint16_t _microseconds = 0
 
uint16_t _nanoseconds = 0
 
- Static Protected Attributes inherited from anch::date::Date
static std::mutex _mutex
 

Detailed Description

SQL date type.

SQL date type.
It will only take into account from years to days.

Since
0.1
Author
Vincent Lachenal

Constructor & Destructor Documentation

◆ Date() [1/4]

anch::sql::Date::Date ( bool init = true)

Date default constructor.

Parameters
initInitialize the Date to now (default true)

◆ Date() [2/4]

anch::sql::Date::Date ( const anch::date::Date & date)

Date private copy constructor

Parameters
dateThe Date to copy

◆ Date() [3/4]

anch::sql::Date::Date ( const std::time_t & time)

Date constructor.

Parameters
timeThe time to set

◆ Date() [4/4]

anch::sql::Date::Date ( const std::tm *const time)

Date constructor.

Parameters
timeThe time to set

◆ ~Date()

virtual anch::sql::Date::~Date ( )
virtual

Date destructor

Reimplemented from anch::date::Date.


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