diff options
author | Paul McGuire <ptmcg@austin.rr.com> | 2016-08-07 14:54:01 +0000 |
---|---|---|
committer | Paul McGuire <ptmcg@austin.rr.com> | 2016-08-07 14:54:01 +0000 |
commit | 7ab1d7c84daba103692f77698ccbd67af03773d9 (patch) | |
tree | e9abae9c616fdfdfebd9a8a0931d8f21824f30d2 /src/examples/deltaTime.py | |
parent | 2baa20ba0ec08f4a074fe3f028932523dfa237cd (diff) | |
download | pyparsing-git-7ab1d7c84daba103692f77698ccbd67af03773d9.tar.gz |
Update to current pyparsing features
Diffstat (limited to 'src/examples/deltaTime.py')
-rw-r--r-- | src/examples/deltaTime.py | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/examples/deltaTime.py b/src/examples/deltaTime.py index a63b19e..e38da00 100644 --- a/src/examples/deltaTime.py +++ b/src/examples/deltaTime.py @@ -202,14 +202,7 @@ if __name__ == "__main__": noon Sunday
noon last Sunday
2pm next Sunday
- next Sunday at 2pm""".splitlines()
-
- for t in tests:
- t = t.strip()
- print(t, "(relative to %s)" % datetime.now())
- res = nlTimeExpression.parseString(t)
- if "calculatedTime" in res:
- print(res.calculatedTime)
- else:
- print("???")
- print('')
+ next Sunday at 2pm"""
+
+ print("(relative to %s)" % datetime.now())
+ nlTimeExpression.runTests(tests)
|