mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-25 19:52:11 +00:00
[utils] Clarify more day-month-first ambiguous formats
This commit is contained in:
parent
27ca82ebc6
commit
776dc3992a
1 changed files with 6 additions and 3 deletions
|
@ -679,9 +679,6 @@ def unified_strdate(date_str, day_first=True):
|
|||
'%b %dth %Y %I:%M%p',
|
||||
'%Y-%m-%d',
|
||||
'%Y/%m/%d',
|
||||
'%d.%m.%Y',
|
||||
'%d/%m/%Y',
|
||||
'%d/%m/%y',
|
||||
'%Y/%m/%d %H:%M:%S',
|
||||
'%Y-%m-%d %H:%M:%S',
|
||||
'%Y-%m-%d %H:%M:%S.%f',
|
||||
|
@ -696,10 +693,16 @@ def unified_strdate(date_str, day_first=True):
|
|||
]
|
||||
if day_first:
|
||||
format_expressions.extend([
|
||||
'%d.%m.%Y',
|
||||
'%d/%m/%Y',
|
||||
'%d/%m/%y',
|
||||
'%d/%m/%Y %H:%M:%S',
|
||||
])
|
||||
else:
|
||||
format_expressions.extend([
|
||||
'%m.%d.%Y',
|
||||
'%m/%d/%Y',
|
||||
'%m/%d/%y',
|
||||
'%m/%d/%Y %H:%M:%S',
|
||||
])
|
||||
for expression in format_expressions:
|
||||
|
|
Loading…
Reference in a new issue