MiniOB 1
MiniOB is one mini database, helping developers to learn how database works.
|
Public 成员函数 | |
Date (const DateTime &val) | |
Date (int date, int month, int year) | |
Date (long sec) | |
Date (const tm *time) | |
void | set_current () |
![]() | |
DateTime (int date, int time) | |
DateTime (int year, int month, int day, int hour, int minute, int second, int millis) | |
DateTime (string &xml_time) | |
void | get_ymd (int &year, int &month, int &day) const |
void | get_hms (int &hour, int &minute, int &second, int &millis) const |
time_t | to_time_t () const |
tm | to_tm () const |
void | set_ymd (int year, int month, int day) |
void | set_hms (int hour, int minute, int second, int millis) |
void | clear_date () |
void | clear_time () |
void | set (int date, int time) |
void | set (const DateTime &other) |
void | operator+= (int seconds) |
string | to_xml_date_time () |
Return date and time as a string in Xml Schema date-time format | |
time_t | str_to_time_t (string &xml_str) |
string | time_t_to_xml_str (time_t timet) |
string | time_t_to_str (int timet) |
string | str_to_time_t_str (string &xml_str) |
time_t | nowtimet () |
string | to_string_local () |
string | to_string_utc () |
time_t | add_duration (string xml_dur) |
void | add_duration_date_time (string xml_dur) |
int | max_day_in_month_for (int year, int month) |
void | parse_duration (string dur_str, struct tm &tm_t) |
额外继承的成员函数 | |
![]() | |
enum | { SECONDS_PER_DAY = 86400 , SECONDS_PER_HOUR = 3600 , SECONDS_PER_MIN = 60 , MINUTES_PER_HOUR = 60 , MILLIS_PER_DAY = 86400000 , MILLIS_PER_HOUR = 3600000 , MILLIS_PER_MIN = 60000 , MILLIS_PER_SEC = 1000 , JULIAN_19700101 = 2440588 } |
enum | { MON_JAN = 1 , MON_FEB = 2 , MON_MAR = 3 , MON_APR = 4 , MON_MAY = 5 , MON_JUN = 6 , MON_JUL = 7 , MON_AUG = 8 , MON_SEP = 9 , MON_OCT = 10 , MON_NOV = 11 , MON_DEC = 12 } |
![]() | |
static bool | is_valid_xml_datetime (const string &str) |
static int | make_hms (int hour, int minute, int second, int millis) |
static DateTime | now () |
static DateTime | from_time_t (time_t t, int millis=0) |
static DateTime | from_tm (const tm &tm, int millis=0) |
static int | julian_date (int year, int month, int day) |
static void | get_ymd (int jday, int &year, int &month, int &day) |
![]() | |
int | m_date |
int | m_time |