Getting today's date in YYYY-MM-DD in Python?

Is there a nicer way than the following to return today's date in the YYYY-MM-DD format?

str(datetime.datetime.today()).split()[0]

← Назад к списку