Modify ↓
Opened 10 years ago
Closed 10 years ago
#12315 closed defect (wontfix)
Date format
| Reported by: | Owned by: | Ryan J Ollos | |
|---|---|---|---|
| Priority: | normal | Component: | DateFieldPlugin |
| Severity: | normal | Keywords: | |
| Cc: | Trac Release: |
Description (last modified by )
Hello,
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 10 years ago by
comment:2 Changed 10 years ago by
| Description: | modified (diff) |
|---|---|
| Status: | new → accepted |
comment:3 Changed 10 years ago by
| Resolution: | → wontfix |
|---|---|
| Status: | accepted → closed |
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.
Note: See
TracTickets for help on using
tickets.



Ok I found solution. I modified the filter.py 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.