Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Datetime solution in Clear category for Date and Time Converter by swagg010164
from datetime import datetime
def date_time(time: str) -> str:
d = datetime.strptime(time, "%d.%m.%Y %H:%M")
ans = d.strftime("%-d %B %Y year %-H hours %-M minutes")
if d.hour == 1:
ans = ans.replace('hours', 'hour')
if d.minute == 1:
ans = ans.replace('minutes', 'minute')
return ans
Feb. 17, 2019
Comments: