switch_utils: Add date time range string compare function switch_fulldate_cmp. It usable in XML dialplan with date-time. String format example : 2009-10-10 14:33:22~2009-11-10 17:32:31.

This commit is contained in:
Marc Olivier Chouinard
2010-09-17 00:21:19 -04:00
parent 4ab8fa13e1
commit c9fcce0869
3 changed files with 145 additions and 0 deletions
+4
View File
@@ -683,6 +683,10 @@ SWITCH_DECLARE(int) switch_inet_pton(int af, const char *src, void *dst);
SWITCH_DECLARE(int) switch_number_cmp(const char *exp, int val);
SWITCH_DECLARE(int) switch_tod_cmp(const char *exp, int val);
SWITCH_DECLARE(int) switch_fulldate_cmp(const char *exp, switch_time_t *ts);
SWITCH_DECLARE(void) switch_split_date(const char *exp, int *year, int *month, int *day);
SWITCH_DECLARE(void) switch_split_time(const char *exp, int *hour, int *min, int *sec);
/*!
\brief Split a user@domain string as user and domain
\param in the input string