Natively support the %Y-%b-%d date format
For parsing dates such as 2020-Jan-01, as seen on https://www.electronjs.org/docs/latest/tutorial/electron-timelines.
This commit is contained in:
@@ -8,6 +8,7 @@ def parse_date(text: str, formats: list[str] = frozenset([
|
||||
"%d %B %Y", # 1 January 2020
|
||||
"%d %b %Y", # 1 Jan 2020
|
||||
"%d-%b-%Y", # 1-Jan-2020
|
||||
"%Y-%b-%d", # 2020-Jan-01
|
||||
"%d-%B-%Y", # 1-January-2020
|
||||
"%Y-%m-%d", # 2020-01-01
|
||||
"%m/%d/%Y", # 01/25/2020
|
||||
|
||||
Reference in New Issue
Block a user