Definition at line 19 of file Date.h.
◆ Date() [1/3]
◆ Date() [2/3]
Definition at line 19 of file Date.cc.
20{
21 set(date.m_time);
22}
◆ Date() [3/3]
◆ ~Date()
◆ get()
◆ getDay()
Definition at line 58 of file Date.cc.
59{
60 return m_tm->tm_mday;
61}
◆ getHour()
Definition at line 53 of file Date.cc.
54{
55 return m_tm->tm_hour;
56}
◆ getMinitue()
Definition at line 48 of file Date.cc.
49{
50 return m_tm->tm_min;
51}
◆ getMonth()
Definition at line 63 of file Date.cc.
64{
65 return m_tm->tm_mon + 1;
66}
◆ getSecond()
Definition at line 43 of file Date.cc.
44{
45 return m_tm->tm_sec;
46}
◆ getYear()
Definition at line 68 of file Date.cc.
69{
70 return m_tm->tm_year + 1900;
71}
◆ operator=()
const Date & operator= |
( |
const Date & |
date | ) |
|
|
inline |
Definition at line 40 of file Date.h.
41 {
42 set(date.m_time);
43 return *this;
44 }
◆ set() [1/2]
Definition at line 31 of file Date.cc.
32{
33 m_time = time(NULL);
34 m_tm = localtime(&m_time);
35}
◆ set() [2/2]
Definition at line 37 of file Date.cc.
38{
39 m_time = time;
40 m_tm = localtime(&m_time);
41}
◆ toString()
const char * toString |
( |
const char * |
format = NULL | ) |
const |
Definition at line 73 of file Date.cc.
74{
75 memset(m_str, 0, sizeof(m_str));
76 if (format == NULL) {
77 strftime(m_str, 31, "%Y-%m-%d %H:%M:%S", m_tm);
78 } else {
79 strftime(m_str, 31, format, m_tm);
80 }
81 return m_str;
82}
◆ m_str
◆ m_time
◆ m_tm
The documentation for this class was generated from the following files: