naturaltime documentation is misleading
Currently documentation says the following:
"[...] falling back to a longer date format if the value is more than a day old."
In fact it won't ever do a date format, instead it will falls back to whatever timesince
/timeuntil
does (1 day ago, 1 year and 2 months ago etc.)
To me it seems more consistent that it would work like naturalday
and fall back to 'DATETIME_FORMAT'
, with the option to pass in a custom format string.
The behavior I expected was (nearly) implemented as a result of ticket #12771, the current behavior was implemented because of ticket #15921.
Change History
(9)
Component: |
contrib.humanize → Documentation
|
milestone: |
→ 1.4
|
Triage Stage: |
Unreviewed → Accepted
|
Easy pickings: |
set
|
Needs documentation: |
set
|
Cc: |
antoviaque added
|
Owner: |
changed from nobody to antoviaque
|
Needs documentation: |
unset
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
Not entirely clear if this is a bug in the code or the docs - tests would imply that the code was not designed to revert to a long date format. The idea that this is a error in the docs is further confirmed by this comment: https://code.djangoproject.com/ticket/15921#comment:3