Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#16941 closed Bug (fixed)

naturaltime documentation is misleading

Reported by: jaap3 Owned by: antoviaque
Component: Documentation Version: master
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 4 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 4 years ago by ptone

  • Component changed from contrib.humanize to Documentation
  • milestone set to 1.4
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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 Changed 4 years ago by jacob

  • milestone 1.4 deleted

Milestone 1.4 deleted

comment:3 Changed 4 years ago by anonymous

  • Easy pickings set
  • Needs documentation set

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

comment:4 Changed 4 years ago by antoviaque

  • Cc antoviaque added
  • Owner changed from nobody to antoviaque

Changed 4 years ago by antoviaque

comment:5 Changed 4 years ago by antoviaque

  • Has patch set

comment:6 Changed 3 years ago by H0ff1

  • Needs documentation unset

comment:7 Changed 3 years ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from new to closed

In [07e10fbe9f1a77fe03cfceeb008e1e56caba3a40]:

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

Thanks antoviaque for the patch.

comment:8 Changed 3 years ago by Tim Graham <timograham@…>

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