-
Committer:
Wouter Bolsterlee
-
Date:
2010-10-26 19:27:26 UTC
-
Revision ID:
uws@xs4all.nl-20101026192726-howo1toqq3cii0q6
[core] Return early when parsing date strings
AnewtDateTime::parse_string() applied various regexes to
test date and time formats, even after a match was already
found. This change makes the function return early when a
match was found. Also put the most frequently encountered
date formats on top to avoid useless regex matching in
common cases.
And while we're at it: some code cleanups, including the use
of proper variable names (clearer and a bit more verbose).