Go to the documentation of this file.
44 #ifndef CCXX_NUMBERS_H_
45 #define CCXX_NUMBERS_H_
47 #ifndef CCXX_THREAD_H_
51 #ifndef CCXX_MISSING_H_
55 #ifndef CCXX_STRCHAR_H_
59 #ifndef CCXX_STRING_H_
63 #ifndef CCXX_THREAD_H_
69 #ifdef CCXX_NAMESPACES
106 {
return getValue();};
109 {
return getValue();};
167 Date(
char *str,
size_t size = 0);
168 Date(
int year,
unsigned month,
unsigned day);
180 void setDate(
const char *str,
size_t size = 0);
188 operator long()
const
189 {
return getValue();};
203 {
return !isValid();};
228 Time(
char *str,
size_t size = 0);
229 Time(
int hour,
int minute,
int second);
251 {
return getValue();};
265 {
return !isValid();};
284 Datetime(
int year,
unsigned month,
unsigned day,
int hour,
int minute,
int second);
319 {fromJulian(buffer);};
326 #ifdef CCXX_NAMESPACES
The Datetime class uses a julian date representation of the current year, month, and day and a intege...
Definition: numbers.h:279
virtual void update(void)
Definition: numbers.h:133
int operator<(const Number &num)
A number class that manipulates a string buffer that is also a date.
Definition: numbers.h:316
int operator>=(const Date &date)
int operator!=(const Time &time)
Date(int year, unsigned month, unsigned day)
int operator==(const Datetime &)
unsigned getMonth(void) const
int operator<(const Date &date)
int operator>(const Date &date)
Date & operator+=(const long val)
long operator=(const long value)
Common C++ generic string class.
char * getDate(char *buffer) const
long julian
Definition: numbers.h:151
long operator+=(const long value)
friend Time operator+(const Time &time, const int val)
time_t getDate(void) const
friend Date operator-(const long val, const Date &date)
int operator>(const Number &num)
int operator==(const Time &time)
time_t getDatetime(void) const
unsigned size
Definition: numbers.h:89
int operator<(const Datetime &)
int getSecond(void) const
long getValue(void) const
String strftime(const char *format) const
int operator>=(const Datetime &)
int getMinute(void) const
The Time class uses a integer representation of the current time.
Definition: numbers.h:216
long operator=(long value)
unsigned getDay(void) const
int operator!=(const Number &num)
void fromSeconds(char *buf) const
friend Time operator-(const Time &time, const int val)
#define __EXPORT
Definition: config.h:979
time_t getDate(tm *buf) const
void setValue(long value)
char * getTime(char *buffer) const
int operator>(const Datetime &)
void update(void)
Definition: numbers.h:318
friend Date operator-(const Date &date, const long val)
Datetime & operator-=(const Datetime &datetime)
friend Time operator+(const int val, const Time &time)
int operator==(const Date &date)
bool operator!() const
Definition: numbers.h:264
int operator<=(const Date &date)
Datetime & operator+=(const Datetime &datetime)
void toJulian(long year, long month, long day)
int operator<=(const Number &num)
ZNumber(char *buf, unsigned size)
Common and portable character string related functions.
friend long operator+(const long val, const Number &num)
char * buffer
Definition: numbers.h:88
friend Time operator-(const Time &time1, const Time &time2)
Time & operator-=(const int val)
unsigned getDayOfWeek(void) const
substitute functions which may be missing in target platform libc.
Time(int hour, int minute, int second)
void fromJulian(char *buf) const
char * getDatetime(char *buffer) const
friend Date operator+(const long val, const Date &date)
Datetime & operator-=(const Time &time)
friend Time operator-(const int val, const Time &time)
int operator==(const Number &num)
void toSeconds(int hour, int minute, int second)
Date & operator-=(const long val)
void setValue(long value)
void setDate(const char *str, size_t size=0)
const char * getBuffer() const
Definition: numbers.h:100
int operator!=(const Datetime &)
Datetime(int year, unsigned month, unsigned day, int hour, int minute, int second)
Datetime & operator+=(const Time &time)
long operator()()
Definition: numbers.h:105
int operator<(const Time &time)
The Date class uses a julian date representation of the current year, month, and day.
Definition: numbers.h:149
bool operator!() const
Definition: numbers.h:202
friend Date operator+(const Date &date, const long val)
time_t getTime(void) const
int operator<=(const Time &time)
virtual void update(void)
A method to use to "post" any changed values when shadowing a mixed object class.
friend long operator+(const Number &num, const long val)
Time & operator+=(const int val)
friend long operator-(const long val, const Number &num)
void setTime(char *str, size_t size=0)
int operator<=(const Datetime &)
Number(char *buffer, unsigned size)
Create an instance of a number.
A number manipulation class.
Definition: numbers.h:86
int operator!=(const Date &date)
Time(char *str, size_t size=0)
int operator>=(const Time &time)
tm * getTime(tm *buf) const
long operator-=(const long value)
friend long operator-(const Number &num, long val)
friend Time operator+(const Time &time1, const Time &time2)
Synchronization and threading services.
long seconds
Definition: numbers.h:218
This is a generic and portable string class.
Definition: string.h:81
int operator>(const Time &time)
Date(char *str, size_t size=0)
long getValue(void) const
Datetime & operator=(const Datetime datetime)
int operator>=(const Number &num)
String operator()() const
Datetime(const char *str, size_t size=0)
String operator()() const