Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
The Art of the Metaobject Pluralization solution in Clear category for Date and Time Converter by flpo
from datetime import datetime
def checkio(dt):
dt = datetime.strptime(dt, '%d.%m.%Y %H:%M')
p = lambda attr: attr + 's' * (getattr(dt, attr) != 1)
return dt.strftime(f'%-d %B %Y year %-H {p("hour")} %-M {p("minute")}')
March 1, 2018
Comments: