diff options
author | cce <devnull@localhost> | 2006-01-09 09:15:26 +0000 |
---|---|---|
committer | cce <devnull@localhost> | 2006-01-09 09:15:26 +0000 |
commit | 09d4facbb27cd0ec67a2638be20781c9d1fcad00 (patch) | |
tree | 5ad72f879de660672f9850677cec40514e01c4ad /paste/util/datetimeutil.py | |
parent | 454cabcbd44baac1062692274ae181713ecaf3b4 (diff) | |
download | paste-09d4facbb27cd0ec67a2638be20781c9d1fcad00.tar.gz |
- add support for 'dd-mon-yyyy' date format
Diffstat (limited to 'paste/util/datetimeutil.py')
-rw-r--r-- | paste/util/datetimeutil.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/paste/util/datetimeutil.py b/paste/util/datetimeutil.py index 5cd20ba..7fbccbe 100644 --- a/paste/util/datetimeutil.py +++ b/paste/util/datetimeutil.py @@ -203,8 +203,11 @@ def parse_date(val): d = d.split("+")[0]
if " " in d:
d = d.split(" ")[0]
- now = date(int(y),int(m),int(d))
- val = "xxx" + val[10:]
+ try:
+ now = date(int(y),int(m),int(d))
+ val = "xxx" + val[10:]
+ except ValueError:
+ pass
# allow for 'now', 'mon', 'tue', etc.
if not now:
|