Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Date and Time Converter by PythonLearner
import re
def date_time(time: str) -> str:
months = ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"]
day, month, year, hours, minutes = map(int, re.split("\s|\.|:", time))
hours_marker = "hour" if hours == 1 else "hours"
minutes_marker = "minute" if hours == 1 else "minutes"
return f"{day} {months[month-1]} {year} year {hours} {hours_marker} {minutes} {minutes_marker}"
March 17, 2019
Comments: