Opened 9 years ago

Closed 8 years ago

#12315 closed defect (wontfix)

Date format

Reported by: grzesiu_mg@… Owned by: Ryan J Ollos
Priority: normal Component: DateFieldPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description (last modified by Ryan J Ollos)


I would like view date in that format YYYY-MM-DD.

In [datefield] section I have defined:

format = yyyymmdd
seperator = -
first_day = 1

But when I define the date field I get the following date format DD-MM-YYYY.

How i can change this I need date format YYYY-MM-DD.

Thanks in advance.

P.S. I used DateField plugin for Trac 0.12.

Attachments (0)

Change History (3)

comment:1 Changed 9 years ago by anonymous

Ok I found solution. I modified the file:

      if match:
            format = {
                'dmy': 'dd%smm%sy',
                'mdy': 'mm%sdd%sy',
                'ymd': 'y%smm%sdd',
            }.get(self.date_format, 'dd%smm%syy')

After change

      if match:
            format = {
                'dmy': 'dd%smm%sy',
                'mdy': 'mm%sdd%sy',
                'ymd': 'yy%smm%sdd',
            }.get(self.date_format, 'dd%smm%syy')

After this change the format date is correct.

Best regards.

comment:2 Changed 9 years ago by Ryan J Ollos

Description: modified (diff)
Status: newaccepted

This was changed in [14331] / #12035.

comment:3 Changed 8 years ago by Ryan J Ollos

Resolution: wontfix
Status: acceptedclosed

It seems the proper mapping is dependent on the locale. Since Trac 1.0 adds a datepicker I suggest upgrading soon, as this plugin won't be actively supported.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

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

Note: See TracTickets for help on using tickets.