Go to the source code of this file.
Defines | |
#define | seenYear seen.tm_year |
#define | seenMonth seen.tm_mon |
#define | seenDay seen.tm_mday |
#define | seenHour seen.tm_hour |
#define | seenMin seen.tm_min |
#define | seenSec seen.tm_sec |
#define | SET_TODAY_TO_TM(tm_name) |
#define | TODAY_SEEN_TIME_TO_TM(tm_name) |
#define | DEF_NOW_DAY_WITH_SEEN_TIME(tm_name) |
#define | ATOI_RANGE(s, min, max) int_range(atoi(s),min,max) |
#define | SET_SEEN_DATE_PLUS_DAYS(rel, plus_days) |
#define | SEEN_TIME_T timegm(&seen) |
#define | TIME_T_GET_STR(s, t) |
Functions | |
int | int_range (int value, int minval, int maxval) |
int | num_days_till_next_wday (int rel_wday, int want_wday) |
char * | time_t_to_string (char *buf, int buflen, time_t t) |
#define ATOI_RANGE | ( | s, | |||
min, | |||||
max | ) | int_range(atoi(s),min,max) |
Definition at line 31 of file time_utils.h.
Referenced by parse_interval(), and parse_moment().
#define DEF_NOW_DAY_WITH_SEEN_TIME | ( | tm_name | ) |
struct tm tm_name; \ TODAY_SEEN_TIME_TO_TM(tm_name)
Definition at line 25 of file time_utils.h.
Referenced by parse_moment().
#define SEEN_TIME_T timegm(&seen) |
Definition at line 50 of file time_utils.h.
Referenced by parse_interval(), and parse_moment().
#define seenDay seen.tm_mday |
Definition at line 9 of file time_utils.h.
Referenced by parse_interval(), and parse_moment().
#define seenHour seen.tm_hour |
Definition at line 10 of file time_utils.h.
Referenced by parse_interval(), and parse_moment().
#define seenMin seen.tm_min |
Definition at line 11 of file time_utils.h.
Referenced by parse_interval(), and parse_moment().
#define seenMonth seen.tm_mon |
Definition at line 8 of file time_utils.h.
Referenced by parse_interval(), and parse_moment().
#define seenSec seen.tm_sec |
Definition at line 12 of file time_utils.h.
Referenced by parse_interval(), and parse_moment().
#define seenYear seen.tm_year |
Definition at line 7 of file time_utils.h.
Referenced by parse_interval(), and parse_moment().
#define SET_SEEN_DATE_PLUS_DAYS | ( | rel, | |||
plus_days | ) |
{ \ time_t plus_t = (rel) + (plus_days) * 24 * 60 * 60; \ struct tm plus_tm; \ gmtime_r(&plus_t, &plus_tm); \ seenYear = plus_tm.tm_year; \ seenMonth = plus_tm.tm_mon; \ seenDay = plus_tm.tm_mday; \ }
Definition at line 33 of file time_utils.h.
Referenced by parse_interval(), and parse_moment().
#define SET_TODAY_TO_TM | ( | tm_name | ) |
(tm_name).tm_year = now_tm.tm_year; \ (tm_name).tm_mon = now_tm.tm_mon; \ (tm_name).tm_mday = now_tm.tm_mday;
Definition at line 14 of file time_utils.h.
Referenced by parse_interval().
#define TIME_T_GET_STR | ( | s, | |||
t | ) |
char s[200]; \ if (!time_t_to_string(s, 200, t)) return;
Definition at line 54 of file time_utils.h.
#define TODAY_SEEN_TIME_TO_TM | ( | tm_name | ) |
SET_TODAY_TO_TM(tm_name); \ (tm_name).tm_hour = seenHour; \ (tm_name).tm_min = seenMin; \ (tm_name).tm_sec = seenSec;
Definition at line 19 of file time_utils.h.
int int_range | ( | int | value, | |
int | minval, | |||
int | maxval | |||
) |
Definition at line 3 of file time_utils.c.
int num_days_till_next_wday | ( | int | rel_wday, | |
int | want_wday | |||
) |
Definition at line 22 of file time_utils.c.
Referenced by parse_interval(), and parse_moment().
char* time_t_to_string | ( | char * | buf, | |
int | buflen, | |||
time_t | t | |||
) |
Definition at line 9 of file time_utils.c.
ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:50:02 2011 by Doxygen 1.6.1