Format date with month name in polish, in python

后端 未结 3 1318
迷失自我
迷失自我 2021-01-14 01:24

Is there an out of the box way to format in python (or within django templates), a date with full month name in accordance to polish language rules?

I want to get:

3条回答
  •  执念已碎
    2021-01-14 01:39

    https://docs.djangoproject.com/es/1.9/ref/templates/builtins/#date

    E
    Month, locale specific alternative representation usually used for long date representation.
    'listopada' (for Polish locale, as opposed to 'Listopad')

    If you want to specify format in your html template then this will do:
    {{ datefield|date:"j E Y" }}

提交回复
热议问题