#2053 closed enhancement (fixed)
[patch] Changed timesince filter to take an optional datetime object & added timeuntil filter
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Template system | Version: | dev |
Severity: | minor | Keywords: | timeslice timeuntil filter |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Useful if we have a blog and want to display comments as "commented 2 hours after the post".
Also added the timeuntil filter for completeness.
Attachments (2)
Change History (6)
by , 18 years ago
Attachment: | timeslice.diff added |
---|
comment:1 by , 18 years ago
Summary: | [patch] Changed timeslice filter to take an optional datetime object & added timeuntil filter → [patch] Changed timesince filter to take an optional datetime object & added timeuntil filter |
---|
timeslice should be timesince, in every instance - sorry.
comment:2 by , 18 years ago
Can you add some unit tests for these two filters, please? They should go in tests/othertests/templates.py.
comment:3 by , 18 years ago
The correctly named patch, with Unit Tests and some slight tweaks to the code.
comment:4 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
[patch] for this ticket.