[Django] #33870: Add a SHORT_TIME_FORMAT to settings.py

4 views
Skip to first unread message

Django

unread,
Jul 27, 2022, 4:15:13 PM7/27/22
to django-...@googlegroups.com
#33870: Add a SHORT_TIME_FORMAT to settings.py
-------------------------------------+-------------------------------------
Reporter: Michael | Owner: nobody
Type: New | Status: new
feature |
Component: Template | Version: 4.0
system | Keywords: short time template
Severity: Normal | setting
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Sometimes one wishes to show a time with seconds, and sometimes without.

The current template date/time options include (spot the odd one out):

{{{
DATETIME_FORMAT
DATE_FORMAT

TIME_FORMAT

SHORT_DATETIME_FORMAT
SHORT_DATE_FORMAT
}}}

It would be much easier to handle this scenario with adding a
SHORT_TIME_FORMAT to the set of template datetime fields, so one could do:

{{{
{{ value|date:"SHORT_TIME_FORMAT" }}
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/33870>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 28, 2022, 12:08:25 AM7/28/22
to django-...@googlegroups.com
#33870: Add a SHORT_TIME_FORMAT to settings.py
-------------------------------------+-------------------------------------
Reporter: Michael | Owner: nobody
Type: New feature | Status: closed
Component: | Version: 4.0
Internationalization |
Severity: Normal | Resolution: wontfix
Keywords: short time template | Triage Stage:
setting | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* cc: Claude Paroz (added)
* resolution: => wontfix
* status: new => closed
* component: Template system => Internationalization


Comment:

`TIME_FORMAT` doesn't contain seconds for any builtin locale, so I'm not
sure if the new setting is necessary or would be widely used. Also,
creating a new setting is always controversial. Please first start a
discussion on the DevelopersMailingList, where you'll reach a wider
audience and see what other think, and
[https://docs.djangoproject.com/en/stable/internals/contributing/bugs-and-
features/#requesting-features follow the guidelines with regards to
requesting features].

--
Ticket URL: <https://code.djangoproject.com/ticket/33870#comment:1>

Reply all
Reply to author
Forward
0 new messages