Use python3 if available
This commit incorporates [fievel's work](0863e1434e) to use python3 if possible.
I have not personally test vim+python3 but overdue dates still works with
python2.
This commit is contained in:
@@ -24,6 +24,7 @@ def _year_regex_before(year):
|
||||
|
||||
year_regex += ')'
|
||||
return '-'.join((year_regex, r'\d{2}', r'\d{2}'))
|
||||
|
||||
def _month_regex_before(year, month):
|
||||
if month == '01':
|
||||
return None
|
||||
@@ -63,6 +64,7 @@ def _day_regex_before(year, month, day):
|
||||
|
||||
|
||||
|
||||
|
||||
def regex_date_before(given_date):
|
||||
year, month, day = given_date.isoformat().split('-')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user