import datetime
print(datetime.datetime.today().strftime("%d.%B.%Y - %A - %X" ))
how can I add ukrainian language to this datetime?
import datetime
print(datetime.datetime.today().strftime("%d.%B.%Y - %A - %X" ))
how can I add ukrainian language to this datetime?
You could use Babel's date module (after pip installing it):
>>> from babel.dates import format_datetime
>>> import datetime
>>> format_datetime(datetime.datetime.today(), locale='uk_UA')
'8 квіт. 2019 р., 20:23:32'
Does this give you what you want?
You can also use Babel's pattern syntax to format the date string, but I am not familiar with Ukrainian date formatting some I am not sure if this formatting is correct:
>>> format_datetime(datetime.datetime.today(), "d.MMMM.Y - EEEE", locale='uk_UA')
'8.квітня.2019 - понеділок'