Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#16941 closed Bug (fixed)

naturaltime documentation is misleading

Reported by: Jaap Roes Owned by: antoviaque
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: antoviaque Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

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.

Attachments (1)

naturaltime-16941.diff (1.6 KB ) - added by antoviaque 13 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 by Preston Holmes, 13 years ago

Component: contrib.humanizeDocumentation
milestone: 1.4
Triage Stage: UnreviewedAccepted

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

comment:2 by Jacob, 13 years ago

milestone: 1.4

Milestone 1.4 deleted

comment:3 by anonymous, 13 years ago

Easy pickings: set
Needs documentation: set

Seems to be a documentation issue then. Should be easy to fix right?

comment:4 by antoviaque, 13 years ago

Cc: antoviaque added
Owner: changed from nobody to antoviaque

by antoviaque, 13 years ago

Attachment: naturaltime-16941.diff added

comment:5 by antoviaque, 13 years ago

Has patch: set

comment:6 by H0ff1, 13 years ago

Needs documentation: unset

comment:7 by Tim Graham <timograham@…>, 12 years ago

Resolution: fixed
Status: newclosed

In [07e10fbe9f1a77fe03cfceeb008e1e56caba3a40]:

Fixed #16941 - Clarified naturaltime output when the time is more than a day old.

Thanks antoviaque for the patch.

comment:8 by Tim Graham <timograham@…>, 12 years ago

In [d1ae3c899f9284beba43ae2c82c42a5feeabdda1]:

[1.4.X] Fixed #16941 - Clarified naturaltime output when the time is more than a day old.

Thanks antoviaque for the patch.
Backport of 07e10fbe9f from master

Note: See TracTickets for help on using tickets.
Back to Top