Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
f like format solution in Clear category for Date and Time Converter by ludek.reif
import calendar
def date_time(time: str) -> str:
date, time = time.split()
day, month, year = (int(i) for i in date.split('.'))
hour, minute = (int(i) for i in time.split(':'))
text_hour = 'hour' if hour == 1 else 'hours'
text_minute = 'minute' if minute == 1 else 'minutes'
return f"{day} {calendar.month_name[month]} {year} year {hour} {text_hour} {minute} {text_minute}"
Sept. 23, 2019