Opened 3 years ago
Closed 3 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 , 3 years ago
| Cc: | added | 
|---|---|
| Component: | Template system → Internationalization | 
| Resolution: | → wontfix | 
| Status: | new → closed | 
  Note:
 See   TracTickets
 for help on using tickets.
    
TIME_FORMATdoesn'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.