Opened 2 years ago

Closed 2 years ago

#33870 closed New feature (wontfix)

Add a SHORT_TIME_FORMAT to settings.py

Reported by: Michael Owned by: nobody
Component: Internationalization Version: 4.0
Severity: Normal Keywords: short time template setting
Cc: Claude Paroz Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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" }}

Change History (1)

comment:1 by Mariusz Felisiak, 2 years ago

Cc: Claude Paroz added
Component: Template systemInternationalization
Resolution: wontfix
Status: newclosed

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 follow the guidelines with regards to requesting features.

Note: See TracTickets for help on using tickets.
Back to Top