Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#23665 closed Cleanup/optimization (fixed)

Precedence of "locale-dictated format" not mentioned for `MONTH_DAY_FORMAT` and `YEAR_MONTH_FORMAT` settings

Reported by: James Beith Owned by: Berker Peksag
Component: Documentation Version: 1.7
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When reading the documentation for SHORT_DATE_FORMAT, and other similar Globalization (i18n/l10n) settings, there is a mention about the use of USE_L10N.

Note that if USE_L10N is set to True, then the corresponding locale-dictated format has higher precedence and will be applied.


However when I was reading the MONTH_DAY_FORMAT and YEAR_MONTH_FORMAT settings there was no mention about USE_L10N.

I was left unsure as to whether the value of USE_L10N affected these two settings. It could be worth mentioning explicitly whether it does or not so the reader is clearly aware.

Change History (5)

comment:1 by Tim Graham, 10 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Berker Peksag, 10 years ago

Has patch: set
Owner: changed from nobody to Berker Peksag
Status: newassigned

I've verified the current behavior by creating a simple AdminModel model.

class MyModelAdmin(ModelAdmin):
    list_display = ('name', 'pub_date')
    list_filter = ['pub_date']
    date_hierarchy = 'pub_date'

Here is the PR: https://github.com/django/django/pull/3510

comment:3 by Tim Graham <timograham@…>, 10 years ago

Resolution: fixed
Status: assignedclosed

In 4f90c99635149fae2f488c03f0b52303fe97e0aa:

Fixed #23665 -- Noted precedence of settings.USE_L10N in MONTH_DAY_FORMAT and YEAR_MONTH.

comment:4 by Tim Graham <timograham@…>, 10 years ago

In 3c2507c38629052ca9b266685b4763494b656947:

[1.7.x] Fixed #23665 -- Noted precedence of settings.USE_L10N in MONTH_DAY_FORMAT and YEAR_MONTH.

Backport of 4f90c99635149fae2f488c03f0b52303fe97e0aa from master

comment:5 by Tim Graham <timograham@…>, 10 years ago

In 159978e5c09b5e3cfbc1922a0890e030d9f52ae5:

[1.6.x] Fixed #23665 -- Noted precedence of settings.USE_L10N in MONTH_DAY_FORMAT and YEAR_MONTH.

Backport of 4f90c99635149fae2f488c03f0b52303fe97e0aa from master

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