Opened 11 years ago
Closed 11 years ago
#22355 closed New feature (wontfix)
Humanize timedelta objects in templates
Reported by: | Anoop Thomas Mathew | Owned by: | |
---|---|---|---|
Component: | Utilities | Version: | dev |
Severity: | Normal | Keywords: | templates, filter, timedelta, humanize, timesince |
Cc: | Anoop Thomas Mathew | Triage Stage: | Unreviewed |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
A filter for humanizing datetime.timedelta objects for templates utilizing on the timesince function already existing. Tests and Documentation included in the patch.
{{time_delta|delta}}
will give the humanized version of timedelta object. Follows the same pattern as of timesince in defaultfilters.py
Eg. 4 weeks, 2 days
Attachments (1)
Change History (3)
by , 11 years ago
Attachment: | timedelta_templatetag_with_tests_and_docs.diff added |
---|
comment:1 by , 11 years ago
Cc: | added |
---|
comment:2 by , 11 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Thanks for the contribution, but we aren't really adding more built-in filters as it's easy enough to add your custom filters based on the needs of each project.
patch for delta filter for humanizing datetime.timedelta objects with tests and docs