Datetime3cc
The datetime class uses a julian date representation of the current year, month, and day and a integer representation of the current time. integer based time class.
Usage
#include <numbers.h>
Inherits Date, and Time.
Public Methods
Datetime (time_t tm)
Datetime (tm *dt)
Datetime (char *str, size_t size=0)
Datetime (int year, unsigned month, unsigned day, int hour, int minute, int second)
Datetime ()
char * getDatetime (char *buffer) const
time_t getDatetime (void) const
bool isValid (void) const
Datetime & operator= (Datetime datetime)
Datetime & operator+= (Datetime &datetime)
Datetime & operator-= (Datetime &datetime)
Datetime & operator+= (Time &time)
Datetime & operator-= (Time &time)
int operator== (Datetime &)
int operator!= (Datetime &)
int operator< (Datetime &)
int operator<= (Datetime &)
int operator> (Datetime &)
int operator>= (Datetime &)
bool operator! ()
std::string strftime (const char *format) const
Detailed description
The Datetime class uses a julian date representation of the current year, month, and day and a integer representation of the current time. Integer based time class.
This is then manipulated in several forms and may be exported as needed.
Author: Marcelo Dalmas <[email protected]>
Constructor & destructor documentation
Datetime::Datetime (time_t tm)
Datetime::Datetime (tm * dt)
Datetime::Datetime (char * str, size_t size = 0)
Datetime::Datetime (int year, unsigned month, unsigned day, int hour, int minute, int second)
Datetime::Datetime ()
Member function documentation
time_t Datetime::getDatetime (void) const
char* Datetime::getDatetime (char * buffer) const
bool Datetime::isValid (void) const
Reimplemented from Date.
bool Datetime::operator! ()
Reimplemented from Time.