Overview
Examples
Screenshots
Comparisons
Applications
Download
Manual
Status & Roadmap
FAQ
Authors & License
Forums
Wiki
Funding Ultimate++
Search on this site











SourceForge.net Logo



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.

d

Found date.

s

String to scan.

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.

date

Date to format.

Return value

Formatted date.

 

int CharFilterDate(int c)

Character filter for dates. Its behaviour is specified by SetDateFilter function.

c

Character to filter.

Return value

Filtered character.

 

void SetDateFormat(const char *fmt)

Sets formating string for dates.

fmt

Formating string.

 

void SetDateScan(const char *scan)

Sets date scan string - this string represents order of day, month and year for StrToDate function.

scan

Date scan string.

 

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.

seps

Filter-string.