Opened 9 years ago

Closed 7 years ago

#6483 closed (fixed)

Support European date format for JavaScript

Reported by: Bastian Kleineidam <calvin@…> Owned by: Marc Garcia
Component: Internationalization Version: master
Severity: Keywords: i18n-rf
Cc: marcoberi@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: UI/UX:

Description

Add support for parsing European date format "DD.MM.YYYY" in
the JavaScript date routines.

Attachments (1)

0008-Support-European-date-format-for-JavaScript.patch (1.7 KB) - added by Bastian Kleineidam <calvin@…> 9 years ago.

Download all attachments as: .zip

Change History (11)

Changed 9 years ago by Bastian Kleineidam <calvin@…>

comment:1 Changed 9 years ago by jefurii

Component: UncategorizedAdmin interface

comment:2 Changed 9 years ago by Jacob

Triage Stage: UnreviewedAccepted

comment:3 Changed 8 years ago by Marc Garcia

Keywords: i18n-rf added
milestone: post-1.0
Owner: changed from nobody to Marc Garcia
Patch needs improvement: set

I think that the patch is not the right approach. As I understand DD/MM/YYYY will be used only when american format cannot be used. It'll be difficult for applications users to realize that 12/01/2008 is first of december, but 13/01/2008 is 13th of January.

I propose to use a i18n setting (stored in django(js).po) so parse the date according to current locale. ISO format could be used in all cases as fall back format.

comment:4 Changed 8 years ago by Marc Garcia

Component: Admin interfaceInternationalization

comment:5 Changed 8 years ago by Bastian Kleineidam <calvin@…>

What approach are you talking about?

This patch only adds a new function to parse the European date format. When or how to use this new function is another question that is not asked or answered by this patch.

comment:6 Changed 8 years ago by G2LOQ

Maybe a typo error in the Regex expression:

    re: /(\d{1,2})\.(\d{1,2}).(\d{4})/
--> re: /(\d{1,2}).(\d{1,2}).(\d{4})/

One extra \ character ?

comment:7 Changed 8 years ago by (none)

milestone: post-1.0

Milestone post-1.0 deleted

comment:8 Changed 7 years ago by marcob

Cc: marcoberi@… added

comment:9 Changed 7 years ago by Jiri Suchan

This bug is fixed in [11964] where formats.py were added. Do you agree?

comment:10 Changed 7 years ago by Jiri Suchan

Resolution: fixed
Status: newclosed

fixed in [11964]

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