#include <dsDate.h>
Functions | |
time_t | dt_convert (const char *format, istream &is) |
time_t | dt_convert (const char *format, const char *src) |
ostream & | dt_format (ostream &dest, char *format, time_t t) |
char * | dt_format (char *dest, int max_size, char *format, time_t t) |
int | dt_interval (char *src, char **newptr) |
time_t | dt_round (time_t t, char *what) |
time_t | dt_nearest (int year, int mon, int mday, int wday, int hour, int min) |
Variables | |
char * | monts [14] |
|
|
|
convert string to date according to format specified format descripption: YY - two digit year YYYY - four digit year MM - two digit month Aaa - Abreviated Three-letter month DD - two digid mday dd - one or two digit mday (mail style) hh,mm,ss - time hoursi (24h), minits, secons ' '(space) - skip all white spaces '.'(dot) - skip any character at this position ';'(semicolon) - remove rest of input |
|
todo: make it real function |
|
convert timestamp to string according to format specified, very close to strftime, but use time_t instead of struct tm and format specified as for dt_convert |
|
convert interval to sec from 1h60m30s notation |
|
return date nearest to passed, if you specify wday it return nearest date after specified or today with matching wday -1 means '*' wday = 0 to 6 (if defined WEEK_START_MON 0 means MON else SUN) mon = 1 to 12 year should be with century (e.g. 2003); |
|
return date part of date_time -d = to day down +d to day up -w = to week down +d to week up -m = to month down +m to month up |
|
Initial value: {"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec" } |