Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
2-lines solution with map and f-string solution in Clear category for Date and Time Converter by bsquare
import re, calendar
def date_time(time: str):
d, M, y, h, m = map(int, re.findall(r"([0-9]{2,4})[^0-9]*", time))
return f"{d} {calendar.month_name[M]} {y} year {h} hour{('', 's')[h!=1]} {m} minute{('', 's')[m!=1]}"
Sept. 18, 2019
Comments: