https://bugzilla.wikimedia.org/show_bug.cgi?id=25476

--- Comment #22 from Philippe Verdy <verd...@wanadoo.fr> 2011-09-02 09:00:08 
UTC ---
You've not understood. What is needed is NOT generating custom formats for
dates & time, but being able to generate a suitable HTMML text *with* its
markup, that allows a numeric timestamp to be recognized as such (as a
timestamp), reliably (not depending on a weak text parser trying to find where
there may be a datetime in the webpage's text), so that a user-specific setting
(working for example with a client-side javascript) will be reliably able to
format this date according to user preferences.

For this, the template does *not* even need to access to user preferences.
So instead of generating a "blind" format such as:

2011-12-31 23:59:59

in the web page (or any other format), the template would only generate
something like this:

<span class="datetime">2011-12-31 23:59:59</span>

or, if the solution must be able to use a date time with a default localized
format according to the default language of the wiki (say in French), it would
generate something like:

<span class="datetime" data="20111231235959">lundi 31 décembre 2011, 23h59
UTC</span>

The result of this is that the HTML page becomes parsable reliably, and users
can have an *optional* javascript (loaded from its preferences) that will
reformat the timestamp using the parsable data contained in the markup which
gives its interpretation.

Then users can have their own locale preferences about how a prerendered date
can be reformatted. All users are then continuing to sign normally their posts,
using the usual sequence of tildes, that will in fine generate a reference to a
standard template generaring this preformatted date, along with its
interpretation defined by the markup also generated by the wiki-specific
template (this template would be wiki-specific only because it would implement
a default format for the preformatted datetime)

Of course this template can easily use the {{#formatdatetime|}} parse function
you indicate for generating the preformatted date, and also generate the
surrounding microformat markup (that gives the semantic of the formatted text).

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to