Databaseconnectionclasses
0.5.3
|
translates date and/or time values in different formats More...
#include <hk_datetime.h>
Public Member Functions | |
hk_datetime (const hk_datetime &) | |
bool | set_date (int day, int month, int year) |
bool | set_time (int hour, int minute, int second) |
bool | set_datetime (int day, int month, int year, int hour, int minute, int second) |
bool | set_date_asstring (const hk_string &s) |
bool | set_time_asstring (const hk_string &s) |
bool | set_datetime_asstring (const hk_string &s) |
hk_string | date_asstring (void) const |
hk_string | time_asstring (void) const |
hk_string | datetime_asstring (void) const |
void | set_dateformat (const hk_string &f) |
void | set_timeformat (const hk_string &f) |
void | set_datetimeformat (const hk_string &f) |
int | day () const |
int | month () const |
int | year () const |
int | hour () const |
int | minute () const |
int | second () const |
void | set_now (void) |
bool | operator= (const hk_datetime &) |
bool | operator== (const hk_datetime &) |
bool | operator!= (const hk_datetime &) |
bool | operator> (const hk_datetime &) |
bool | operator>= (const hk_datetime &) |
bool | operator< (const hk_datetime &) |
bool | operator<= (const hk_datetime &) |
double | difference (const hk_datetime &d) |
![]() | |
void | hkclassname (const hk_string &n) |
hk_string | hkclassname (void) const |
void | hkdebug (const hk_string &d) const |
void | hkdebug (const hk_string &d, const hk_string &e) const |
void | hkdebug (const hk_string &d, int i) const |
void | hkdebug (const hk_string &d, double i) const |
void | wanna_debug (bool d) |
bool | wanna_debug (void) const |
bool | generaldebug (void) |
virtual void | savedata (ostream &s) |
virtual void | loaddata (xmlNodePtr definition) |
Protected Member Functions | |
bool | is_ok_date (int day, int month, int year) |
bool | is_ok_time (int hour, int minute, int second) |
![]() | |
hk_interpreter * | new_interpreter (const hk_string &interpreter, hk_presentation *) |
Additional Inherited Members | |
![]() | |
enum | enum_interaction { noninteractive, interactive } |
enum | enum_measuresystem { cm, inch } |
enum | enum_tagtype { normaltag, mastertag } |
![]() | |
static void | set_generaldebug (bool d) |
static hk_string | hk_translate (const hk_string &t) |
static void | show_warningmessage (const hk_string &m) |
static void | set_warningmessage (messagewindowtype *m) |
static bool | show_yesnodialog (const hk_string &m, bool default_value) |
static void | set_yesnodialog (yesno_dialogtype *d) |
static hk_string | show_stringvaluedialog (const hk_string &t) |
static void | set_stringvaluedialog (stringvalue_dialogtype *t) |
static void | set_translatefunction (translatefunctiontype *t) |
static void | set_filedialog (file_dialogtype *f) |
static hk_string | show_filedialog (const hk_string &f="", enum_operationmode m=file_open) |
static void | set_directorydialog (stringvalue_dialogtype *f) |
static hk_string | show_directorydialog (const hk_string &f="") |
static void | set_showpedantic (bool s) |
static bool | showpedantic (void) |
static void | set_measuresystem (enum_measuresystem) |
static enum_measuresystem | measuresystem (void) |
static xmlNodePtr | get_tagvalue (xmlNodePtr where, const hk_string &tag, hk_string &value, int position=1, enum_tagtype tagtype=normaltag) |
static xmlNodePtr | get_tagvalue (xmlNodePtr where, const hk_string &tag, unsigned long &value, int position=1) |
static xmlNodePtr | get_tagvalue (xmlNodePtr where, const hk_string &tag, unsigned int &value, int position=1) |
static xmlNodePtr | get_tagvalue (xmlNodePtr where, const hk_string &tag, long &value, int position=1) |
static xmlNodePtr | get_tagvalue (xmlNodePtr where, const hk_string &tag, int &value, int position=1) |
static xmlNodePtr | get_tagvalue (xmlNodePtr where, const hk_string &tag, bool &value, int position=1) |
static xmlNodePtr | get_tagvalue (xmlNodePtr &where, const hk_string &tag) |
static void | set_tagvalue (ostream &stream, const hk_string &tag, const hk_string &value) |
static void | set_tagvalue (ostream &stream, const hk_string &tag, unsigned long value) |
static void | set_tagvalue (ostream &stream, const hk_string &tag, unsigned int value) |
static void | set_tagvalue (ostream &stream, const hk_string &tag, long value) |
static void | set_tagvalue (ostream &stream, const hk_string &tag, int value) |
static void | set_tagvalue (ostream &stream, const hk_string &tag, bool value) |
static void | start_mastertag (ostream &stream, const hk_string &tag) |
static void | end_mastertag (ostream &stream, const hk_string &tag) |
static void | set_defaultdatetimeformat (const hk_string &timeformat, const hk_string &dateformat, const hk_string &datetimeformat) |
static hk_string | defaultdateformat (void) |
static hk_string | defaulttimeformat (void) |
static hk_string | defaultdatetimeformat (void) |
static void | save_preferences (void) |
static bool | runtime_only (void) |
static void | set_locale (const hk_string &locale) |
static hk_string | locale (void) |
static void | set_defaultdriver (const hk_string &d) |
static hk_string | defaultdriver (void) |
static void | set_default_automatic_data_update (bool) |
static bool | default_automatic_data_update (void) |
![]() | |
static hk_string | p_defaulttimeformat ="h:m:s" |
static hk_string | p_defaultdateformat ="D.M.Y" |
static hk_string | p_defaultdatetimeformat ="D.M.Y h:m:s" |
static bool | p_runtime_only =false |
translates date and/or time values in different formats
hk_string hk_datetime::date_asstring | ( | void | ) | const |
References hk_class::hkdebug().
Referenced by hk_dsdatavisible::defaultvalue().
hk_string hk_datetime::datetime_asstring | ( | void | ) | const |
References hk_class::hkdebug().
Referenced by hk_dsdatavisible::defaultvalue().
double hk_datetime::difference | ( | const hk_datetime & | d | ) |
returns the difference in seconds,negative values say that this object is contains a time before d;
bool hk_datetime::set_date | ( | int | day, |
int | month, | ||
int | year | ||
) |
sets the date
References hk_class::hkdebug().
bool hk_datetime::set_date_asstring | ( | const hk_string & | s | ) |
sets the date.
s | contains the date as a hk_string in the format as specified with set_dateformat |
References hk_class::hkdebug().
void hk_datetime::set_dateformat | ( | const hk_string & | f | ) |
Any hk_string is valid. The values have to be separated with at least one character. The variables are D for the day M for the month Y for the year example : "D.M.Y" shows the 4th of November 2001 as 04.11.2001 and "Y-M-D" as 2001-11-04
References hk_class::hkdebug().
bool hk_datetime::set_datetime | ( | int | day, |
int | month, | ||
int | year, | ||
int | hour, | ||
int | minute, | ||
int | second | ||
) |
sets date and time
References hk_class::hkdebug().
bool hk_datetime::set_datetime_asstring | ( | const hk_string & | s | ) |
s | contains the date and time as a hk_string in the format as specified with set_datetimeformat |
References hk_class::hkdebug().
void hk_datetime::set_datetimeformat | ( | const hk_string & | f | ) |
Any hk_string is valid. The values have to be separated with at least one character. The variables are D for the day M for the month Y for the year h for the hour m for the minute s for the second example : "D.M.Y h:m:s" shows the 4th of November 2001 at noon as 04.11.2001 12:00:00 and "Y-M-D h/m" as 2001-11-04 12/00
References hk_class::hkdebug().
void hk_datetime::set_now | ( | void | ) |
sets the current date and time
References hk_class::hkdebug().
bool hk_datetime::set_time | ( | int | hour, |
int | minute, | ||
int | second | ||
) |
sets the time
References hk_class::hkdebug().
bool hk_datetime::set_time_asstring | ( | const hk_string & | s | ) |
s | contains the time as a hk_string in the format as specified with set_timeformat |
References hk_class::hkdebug().
void hk_datetime::set_timeformat | ( | const hk_string & | f | ) |
Any hk_string is valid. The values have to be separated with at least one character. The variables are h for the hour m for the minute s for the second example : "h:m:s" shows the noon as 12:00:00 and "h/m" as 12/00
References hk_class::hkdebug().
hk_string hk_datetime::time_asstring | ( | void | ) | const |
References hk_class::hkdebug().
Referenced by hk_dsdatavisible::defaultvalue().