Modify

Opened 15 years ago

Closed 8 years ago

#7101 closed enhancement (wontfix)

Support localised date formats

Reported by: willholley@… Owned by: Ryan J Ollos
Priority: normal Component: PlannedMilestonesMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

would be nice if it supported UK date formats (or the ability to specify a format string as a parameter to the macro)

Attachments (1)

datefield_settings.png (25.6 KB) - added by dnedelchev 14 years ago.
See fields 'format' (values: dmy, mdy, ymd) and 'separator' (from DateField Plugin's Options)

Download all attachments as: .zip

Change History (7)

comment:1 Changed 15 years ago by Ryan J Ollos

I imagine that there is a Python package that would make this easy to implement, but I'd have to do some research. Please let me know if you know of an easy way to implement ...

comment:2 Changed 15 years ago by willholley

I had a quick look yesterday but ended up just hacking the macro to format the dates in uk format. I'd expect trac to have some system setting for the default date format somewhere?

comment:4 Changed 15 years ago by Ryan J Ollos

Replying to willholley:

I had a quick look yesterday but ended up just hacking the macro to format the dates in uk format. I'd expect trac to have some system setting for the default date format somewhere?

If such a preference existed, it would probably be listed here, but I don't see it listed.

What does a UK date format look like? I'd thought YYYY-MM-DD to be universally accepted.

A preference might be useful because it could be used in places such as the timeline and roadmap, but you'd have to request an enhancement to Trac, and then the PlannedMilestonesMacro could be modified once the API functionality was made available.

comment:5 Changed 15 years ago by anonymous

We would normally expect dates in the format DD-MM-YYYY. I'll investigate further with trac directly about a preference...

Changed 14 years ago by dnedelchev

Attachment: datefield_settings.png added

See fields 'format' (values: dmy, mdy, ymd) and 'separator' (from DateField Plugin's Options)

comment:6 Changed 14 years ago by dnedelchev

You can see how it's implemented in DateFieldPlugin (I've attached a screenshot too).

However IMHO it would be definitely best if it was an global trac-environment-level option instead of a set of individual plugins' date-format settings.
If there was a global TracDateFormat setting then any reated hack/plugin whould account for it. (It implies creating an enhancement request for Trac of course if there is no such already)

For example I whould like to use YYYY-MM-DD format everywhere, but for the Milestone view it seems the server default format is used (I think so since I have YYYY-MM-DD on my WinXP-hosted test environments and MM/DD/YYYY on our linux-hosted production environments. I think no one wants to get mixed date formats in a single environment.

comment:7 Changed 8 years ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

The plugin is deprecated. Please consider using UpcomingMilestonesChartMacro, and keep an eye on #11702 for forthcoming support in Trac.

Modify Ticket

Change Properties
Set your email in Preferences
Action
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.