Details
-
Improvement
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
2.6.2
-
None
-
Any
Description
This issue originated from JSPWIKI-196
brushed proposal for rendering time/dates:
All template JSPs are currently using JSTL for date formatting. For example:
<fmt:formatDate value="<%= firstPage.getLastModified() %>" pattern="${prefs['DateFormat']}" />
This formats the date according to the preferred date-format (the default is read from jspwiki.properties) and according to the default locale, which typically is taken from the user's browser.
However, several plugins and tags (RecentChangesPlugin, CurrentTimePlugin, WebLogPlugin, ...) are using there own cooking to format dates.
To resolve this, I would recommend to introduce a helper function to format dates consistently, which uses the selected preferences and default browser settings.
So you can use from plugin code :
SimpleDateFormat fmt = Preferences.getDateFormat( pagecontext );
Attachments
Issue Links
- is a clone of
-
JSPWIKI-196 Consistent date and time formats
- Closed