Skip to content

Commit

Permalink
preparing for v2.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
bear committed Feb 29, 2016
1 parent e9a3b97 commit 7c9a6ca
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ test:
nosetests

build: clean
python setup.py sdist upload
python setup.py bdist_wheel upload
python setup.py sdist
python setup.py bdist_wheel

upload: clean
python setup.py sdist upload
Expand Down
4 changes: 2 additions & 2 deletions parsedatetime/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ def _evalModifier(self, modifier, chunk1, chunk2, sourceTime):
# day-of-week, we want to start with target as the day
# in the current week.
dowOffset = offset
if not modifier in ['next', 'last', 'prior', 'previous']:
if modifier not in ['next', 'last', 'prior', 'previous']:
dowOffset = 0

wkdy = self.ptc.WeekdayOffsets[wkdy]
Expand All @@ -932,7 +932,7 @@ def _evalModifier(self, modifier, chunk1, chunk2, sourceTime):
t, subctx = self.parse(chunk1, sourceTime, VERSION_CONTEXT_STYLE)
if subctx.hasDateOrTime:
delta = time.mktime(t) - time.mktime(sourceTime)
target = start + datetime.timedelta(days=diff) + datetime.timedelta(seconds = delta * offset)
target = start + datetime.timedelta(days=diff) + datetime.timedelta(seconds=delta * offset)
chunk1 = ''

sourceTime = target.timetuple()
Expand Down
22 changes: 11 additions & 11 deletions parsedatetime/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ class pdtContext(object):
"""

__slots__ = ('accuracy', )

ACU_YEAR = 2**0
ACU_MONTH = 2**1
ACU_WEEK = 2**2
ACU_DAY = 2**3
ACU_HALFDAY = 2**4
ACU_HOUR = 2**5
ACU_MIN = 2**6
ACU_SEC = 2**7
ACU_NOW = 2**8
__slots__ = ('accuracy',)

ACU_YEAR = 2 ** 0
ACU_MONTH = 2 ** 1
ACU_WEEK = 2 ** 2
ACU_DAY = 2 ** 3
ACU_HALFDAY = 2 ** 4
ACU_HOUR = 2 ** 5
ACU_MIN = 2 ** 6
ACU_SEC = 2 ** 7
ACU_NOW = 2 ** 8

ACU_DATE = ACU_YEAR | ACU_MONTH | ACU_WEEK | ACU_DAY
ACU_TIME = ACU_HALFDAY | ACU_HOUR | ACU_MIN | ACU_SEC | ACU_NOW
Expand Down

0 comments on commit 7c9a6ca

Please sign in to comment.