mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-09 05:21:13 +02:00
Fix for dateutils change breaking royalroad
This commit is contained in:
parent
b94779f7d4
commit
f7dcce698b
1 changed files with 2 additions and 2 deletions
|
|
@ -73,10 +73,10 @@ def parse_relative_date_string(reldatein):
|
|||
logger.debug("val:%s unit_string:%s unit:%s"%(value, unit_string, unit))
|
||||
## I'm not going to worry very much about accuracy for a site
|
||||
## that considers '2 years ago' an acceptable time stamp.
|
||||
if "year" in unit_string or 'year' in unit:
|
||||
if "year" in unit_string or unit and ('year' in unit):
|
||||
value = unicode(int(value)*365)
|
||||
unit = 'days'
|
||||
elif "month" in unit_string or 'month' in unit:
|
||||
elif "month" in unit_string or unit and ('month' in unit):
|
||||
value = unicode(int(value)*31)
|
||||
unit = 'days'
|
||||
logger.debug("val:%s unit_string:%s unit:%s"%(value, unit_string, unit))
|
||||
|
|
|
|||
Loading…
Reference in a new issue