We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e652581 commit 0115ee4Copy full SHA for 0115ee4
Lib/_strptime.py
@@ -313,8 +313,8 @@ def __init__(self, locale_time=None):
313
'Z'),
314
'%': '%'}
315
for d in 'dmyHIMS':
316
- mapping['O' + d] = r'(?P<%s>[0-9][0-9]|[0-9]| [0-9])' % d
317
- mapping['Ow'] = r'(?P<w>[0-9])'
+ mapping['O' + d] = r'(?P<%s>\d\d|\d| \d)' % d
+ mapping['Ow'] = r'(?P<w>\d)'
318
mapping['W'] = mapping['U'].replace('U', 'W')
319
base.__init__(mapping)
320
base.__setitem__('X', self.pattern(self.locale_time.LC_time))
0 commit comments