6
This commit is contained in:
8
solutions/lc1507.py
Normal file
8
solutions/lc1507.py
Normal file
@@ -0,0 +1,8 @@
|
||||
class Solution:
|
||||
def reformatDate(self, date: str) -> str:
|
||||
month = ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
|
||||
|
||||
d = date.split(" ")
|
||||
|
||||
return f"{d[2]}-{month.index(d[1])+1:02}-{int(d[0][:-2]):02}"
|
||||
Reference in New Issue
Block a user