Opened 15 years ago
Closed 14 years ago
#15921 closed New feature (fixed)
naturaltime filter should only work with time, current filter should be renamed to naturaldatetime
| Reported by: | Harro | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.humanize | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Harro | Triage Stage: | Accepted |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
In relation to #12771 and [16071]:
The naturalday filter only works with dates, I think naturaltime should only work with times.
I propose changing it a bit so you can use them combined with this as the output:
today, 1 second ago
today, 1 hour ago
yesterday, 9:00
yesterday, 21:00
26-04-2011, 21:00
I suggest adding a third which used naturaltime and naturalday combined to create the current functionality.
naturaldatetime oid.
Attachments (1)
Change History (6)
comment:1 by , 15 years ago
| Cc: | added |
|---|
comment:2 by , 15 years ago
| Triage Stage: | Unreviewed → Design decision needed |
|---|---|
| Type: | Uncategorized → New feature |
comment:3 by , 14 years ago
| Triage Stage: | Design decision needed → Accepted |
|---|
by , 14 years ago
| Attachment: | 15921.1.diff added |
|---|
comment:4 by , 14 years ago
| Has patch: | set |
|---|
Note:
See TracTickets
for help on using tickets.
Yeah, that filter is really not that good (the ungettext calls aren't passed the arguments).
I also agree that it should be solely a time based filter and not fall back to defaultfilters.date but instead to the timesince and timeuntil.