Date formatting and scanning
const char *StrToDate(Date& d, const char *s)
Scans a string for a Date. Order of day, month and year is specified using SetDateScan. In place of month both number and text is accepted - text must match abbreviated or full name of month.
|
Return value |
NULL if no date is found in s or position right after the date. |
String Format(Date date)
Formats date. Date is formated using the standard Format function, where the string set by SetDateFormat is used as formating string, and the three supplied integer value arguments are year, month and day.
|
Return value |
Formatted date. |
int CharFilterDate(int c)
Character filter for dates. Its behaviour is specified by SetDateFilter function.
|
Return value |
Filtered character. |
void SetDateFormat(const char *fmt)
Sets formating string for dates.
void SetDateScan(const char *scan)
Sets date scan string - this string represents order of day, month and year for StrToDate function.
void SetDateFilter(const char *seps)
Specifies CharFilterDate behaviour. Digits are always allowed in CharFilterDate. If there is "a" at the beginning of seps string, letters are allowed. If there is "A", letters are allowed and converted to upper-case. After this optional character, list of characters allowed as separator follows. "\a" after character designates "amend" character - if used, all characters up to next "amend" character are replaced by it.
|