[filter] handle new format in Time filter
This commit is contained in:
parent
3055ea3dd1
commit
1e3568891b
1 changed files with 1 additions and 1 deletions
|
|
@ -622,7 +622,7 @@ class DateGuesser(Filter):
|
|||
|
||||
class Time(Filter):
|
||||
klass = datetime.time
|
||||
_regexp = re.compile(r'(?P<hh>\d+):?(?P<mm>\d+)(:(?P<ss>\d+))?')
|
||||
_regexp = re.compile(r'(?P<hh>\d+)[:h]?(?P<mm>\d+)([:m](?P<ss>\d+))?')
|
||||
kwargs = {'hour': 'hh', 'minute': 'mm', 'second': 'ss'}
|
||||
|
||||
def __init__(self, selector=None, default=_NO_DEFAULT):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue