This function converts a stream of characters into an AmigaDOS DateStamp structure. The characters are obtained from the getCharFunc callback hook and the formatting template is used to direct the parse.
INPUTS
locale
the locale to use for the formatting
date
place to put the converted date, this may be NULL in which case this routine can be used to simply validate a date
fmtTemplate
the date template describing the expected format of the data. See FormatDate() documentation for a description of date templates. The following formatting controls from FormatDate() can be used in ParseDate():
%a %A %b %B %d %e %h %H %I %m %M %p %S %y %Y
getCharFunc
a callback hook invoked whenever a character is required. The hook should return the next character to process, with a NULL character to indicate the end of the string. The hook is called with:
A0
address of Hook structure
A1
locale pointer
A2
NULL
The hook returns the character to process in D0. Note that a complete 32-bit result is expected in D0, not just 8 bits.
RESULT
state
TRUE if the parsing went OK, or FALSE if the input did not match the template