Code

Opened 6 years ago

Closed 4 years ago

#6483 closed (fixed)

Support European date format for JavaScript

Reported by: Bastian Kleineidam <calvin@…> Owned by: garcia_marc
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@…> 6 years ago.

Download all attachments as: .zip

Change History (11)

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

comment:1 Changed 6 years ago by jefurii

  • Component changed from Uncategorized to Admin interface
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 6 years ago by jacob

  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 6 years ago by garcia_marc

  • Keywords i18n-rf added
  • milestone set to post-1.0
  • Owner changed from nobody to garcia_marc
  • 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 6 years ago by garcia_marc

  • Component changed from Admin interface to Internationalization

comment:5 Changed 6 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 6 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 5 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

comment:8 Changed 5 years ago by marcob

  • Cc marcoberi@… added

comment:9 Changed 5 years ago by yedpodtrzitko

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

comment:10 Changed 4 years ago by yedpodtrzitko

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

fixed in [11964]

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.