From 85b9a77b0e9a818c76f736d7e9cc5b38d06ef228 Mon Sep 17 00:00:00 2001 From: supergonkas Date: Tue, 3 May 2016 17:12:49 +0100 Subject: [PATCH 1/3] Add "full" support for years and months only --- pytimeparse/timeparse.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pytimeparse/timeparse.py b/pytimeparse/timeparse.py index 94a5c64..77e1f73 100644 --- a/pytimeparse/timeparse.py +++ b/pytimeparse/timeparse.py @@ -71,6 +71,10 @@ TIMEFORMATS = [ DAYCLOCK=DAYCLOCK), r'{SECCLOCK}'.format( SECCLOCK=SECCLOCK), + #r'{YEARS}'.format( + #YEARS=YEARS), + #r'{MONTHS}'.format( + #MONTHS=MONTHS), ] MULTIPLIERS = dict([ @@ -98,6 +102,8 @@ def _interpret_as_minutes(sval, mdict): and (('hours' not in mdict) or (mdict['hours'] is None)) and (('days' not in mdict) or (mdict['days'] is None)) and (('weeks' not in mdict) or (mdict['weeks'] is None)) + #and (('months' not in mdict) or (mdict['months'] is None)) + #and (('years' not in mdict) or (mdict['years'] is None)) ): mdict['hours'] = mdict['mins'] mdict['mins'] = mdict['secs'] From d11a97793a3c531109dc5bd41c5e2d99a0e37c8f Mon Sep 17 00:00:00 2001 From: Will Roberts Date: Mon, 9 May 2016 13:55:08 +0200 Subject: [PATCH 2/3] .travis.yml: coverage 4 drops support for python 3.2 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e644439..87de8e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ python: - "3.3" - "3.4" # command to install dependencies -install: "pip install . coveralls" +install: "pip install . coverage<4 coveralls" # command to run tests script: coverage run --source=pytimeparse setup.py test From 939acb745721f043fa9b56ea66c42b4484fbd1dd Mon Sep 17 00:00:00 2001 From: Will Roberts Date: Mon, 9 May 2016 13:57:35 +0200 Subject: [PATCH 3/3] .travis.yml: fix shell syntax error --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 87de8e3..48851ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ python: - "3.3" - "3.4" # command to install dependencies -install: "pip install . coverage<4 coveralls" +install: "pip install . 'coverage<4' coveralls" # command to run tests script: coverage run --source=pytimeparse setup.py test