Fix alignment to 4 spaces
This commit is contained in:
parent
77ed563581
commit
5621107ee2
1 changed files with 14 additions and 10 deletions
|
|
@ -50,8 +50,10 @@ class date(real_date):
|
||||||
class datetime(real_datetime):
|
class datetime(real_datetime):
|
||||||
def strftime(self, fmt):
|
def strftime(self, fmt):
|
||||||
return strftime(self, fmt)
|
return strftime(self, fmt)
|
||||||
|
|
||||||
def combine(self, date, time):
|
def combine(self, date, time):
|
||||||
return datetime(date.year, date.month, date.day, time.hour, time.minute, time.microsecond, time.tzinfo)
|
return datetime(date.year, date.month, date.day, time.hour, time.minute, time.microsecond, time.tzinfo)
|
||||||
|
|
||||||
def date(self):
|
def date(self):
|
||||||
return date(self.year, self.month, self.day)
|
return date(self.year, self.month, self.day)
|
||||||
|
|
||||||
|
|
@ -75,17 +77,19 @@ def new_datetime(d):
|
||||||
# Allowed if there's an even number of "%"s because they are escaped.
|
# Allowed if there's an even number of "%"s because they are escaped.
|
||||||
_illegal_formatting = re.compile(r"((^|[^%])(%%)*%[sy])")
|
_illegal_formatting = re.compile(r"((^|[^%])(%%)*%[sy])")
|
||||||
|
|
||||||
|
|
||||||
def _findall(text, substr):
|
def _findall(text, substr):
|
||||||
# Also finds overlaps
|
# Also finds overlaps
|
||||||
sites = []
|
sites = []
|
||||||
i = 0
|
i = 0
|
||||||
while 1:
|
while 1:
|
||||||
j = text.find(substr, i)
|
j = text.find(substr, i)
|
||||||
if j == -1:
|
if j == -1:
|
||||||
break
|
break
|
||||||
sites.append(j)
|
sites.append(j)
|
||||||
i=j+1
|
i = j+1
|
||||||
return sites
|
return sites
|
||||||
|
|
||||||
|
|
||||||
def strftime(dt, fmt):
|
def strftime(dt, fmt):
|
||||||
if dt.year >= 1900:
|
if dt.year >= 1900:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue