Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#3680 closed enhancement (fixed)

Include an example Date Format on WebAdmin Plugin pages. Such as "mm/dd/yyyy".

Reported by: MattScilipoti Owned by: Matthew Good
Priority: lowest Milestone:
Component: admin/web Version: 0.10b1
Severity: minor Keywords:
Cc: matts@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Include an example Date Format on WebAdmin Plugin pages. Such as "mm/dd/yyyy".

Required on:

  • Add Milestone (for Due).
  • Add Version (for Time).

Attachments (1)

TracWebAdminDateFormat.patch (1.1 KB ) - added by MattScilipoti 18 years ago.
Displays required Date format in WebAdmin Plugin.

Download all attachments as: .zip

Change History (11)

comment:1 by anonymous, 18 years ago

If you enter an invalid date format you receive this error:

Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 335, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 220, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-i686/egg/webadmin/web_ui.py", line 109, in process_request
  File "build/bdist.linux-i686/egg/webadmin/ticket.py", line 162, in process_admin_request
  File "/usr/lib/python2.3/site-packages/trac/util/datefmt.py", line 114, in parse_date
    raise ValueError, '%s is not a known date format.' % text
ValueError: 22 is not a known date format.

by MattScilipoti, 18 years ago

Displays required Date format in WebAdmin Plugin.

comment:2 by MattScilipoti, 18 years ago

Cc: matts@… com added

I included a patch. Please verify these are the correct formats. I am reasonably certain of Milestone, guessing at Time format.

comment:3 by anonymous, 18 years ago

Component: trac-adminwebadmin
Owner: changed from daniel to Christopher Lenz

comment:4 by anonymous, 18 years ago

Cc: matts@… added; matts@… com removed

comment:5 by anonymous, 18 years ago

The date format for Add Milestone is "mmm dd,yyyy".

in reply to:  5 comment:6 by Matthew Good, 18 years ago

Replying to anonymous:

The date format for Add Milestone is "mmm dd,yyyy".

Trac's date format is based on your locale, so if that's the format you see it's because it should be the appropriate one based on your system's language settings.

comment:7 by Matt Scilipoti, 18 years ago

It does not appear to be using my OS's (WinXP) locale settings.

My Regional Options indicate these formats:

Name Sample Indicating that the Format is
Short Date 9/12/2006 m/dd/yyyy
Long Date Tuesday, September 12, 2006 dddd, mmmm dd,yyyy

But WebAdmin gives me the above listed parse_date error when using these formats.

It does not error if I use mmm dd, yyyy (ie. Sep 12, 2006).

in reply to:  7 comment:8 by Matthew Good, 18 years ago

Replying to Matt Scilipoti:

It does not appear to be using my OS's (WinXP) locale settings.

…snip…

But WebAdmin gives me the above listed parse_date error when using these formats.

It does not error if I use mmm dd, yyyy (ie. Sep 12, 2006).

Sorry, I didn't mean to pull this ticket off topic. If you have more questions about the date formatting please ask on the MailingList. Trac actually tries a few formats using the locale-based date formats, and as a last resort falls back on '%b %d, %Y' which would match the "Sep 12, 2006" format. You should be able to see the expected date format when editing a milestone from the Roadmap.

comment:9 by Matthew Good, 18 years ago

Owner: changed from Christopher Lenz to Matthew Good
Status: newassigned

comment:10 by Matthew Good, 18 years ago

Resolution: fixed
Status: assignedclosed

Ok, a format hint has been added in r3727.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Matthew Good.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Matthew Good to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.