summaryrefslogtreecommitdiff
path: root/src/examples/deltaTime.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/deltaTime.py')
-rw-r--r--src/examples/deltaTime.py15
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)