Opened 19 years ago

Closed 19 years ago

Last modified 17 years ago

#196 closed defect (fixed)

Patch: Allow integer months in views.generic.date_based

Reported by: Moof <moof@…> Owned by: Adrian Holovaty
Component: Core (Other) Version:
Severity: normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

While the three-letter months are nice and pretty, they are not international-safe. Given that most web hosting servers don't allow you to set the locale, and even if it did you might be hosting more than one language on the box. So a poor Spaniard will be wondering why he's looking at "jan" rather than "ene" if hosted on an English server.

The following patch keeps the three-letter months as an option in the various views that use months, but also allows for one- or two-digit month numbers.

Attachments (1)

date_based_integer_months.patch (1.5 KB ) - added by Moof <moof@…> 19 years ago.
Patch against r304 of date_based.py

Download all attachments as: .zip

Change History (5)

by Moof <moof@…>, 19 years ago

Patch against r304 of date_based.py

comment:1 by Moof <moof@…>, 19 years ago

Component: Admin interfaceCore framework

Oops, stuck it in the wrong component. Though I'm not certain this is the right place either.

comment:2 by zzzirk <zzzirk@…>, 19 years ago

Glad to see this change made. I hacked my version of the source and had thought about doing this as well. I'm glad to see someone beat me to it.

comment:3 by Jacob, 19 years ago

Resolution: fixed
Status: newclosed

(In [308]) Fixed #196: date-based generic views now have a "use_numeric_months" option if you'd like to use numeric months in the urls. Also fixed #183 while I was at it.

comment:4 by Adrian Holovaty, 19 years ago

Note that I change this syntax to be less rigid in [312].

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