Django自定义标记模板日期到单词

2024-05-29 05:53:12 发布

您现在位置:Python中文网/ 问答频道 /正文

我想把日期标签改成

29 July

TWENTYNINE JULY

目前情况如下:

{{ article.publishing_date|date }}

格式示例:

{{ article.publishing_date|date:"F n, Y" }}

其他注释。。你知道吗

{% get_current_time "%Y-%m-%d %I:%M %p" as the_time %} 
<p>The time is {{ the_time }}.</p>

https://docs.djangoproject.com/en/1.9/howto/custom-template-tags/https://pypi.python.org/pypi/num2words


Tags: thehttpspypi示例getdatetime格式

热门问题