Last modified: 2014-03-03 20:42:19 UTC
Transform the date in the author line to user preference date format: "Von username (talk · contribs) · 29 Bearbeitungen seit 2011-11-05" Expected output: "Von username (talk · contribs) · 29 Bearbeitungen seit 5. Juni 2011"
*** Bug 39379 has been marked as a duplicate of this bug. ***
The problem is this is all being done on the client side, and the API is not aware of the user's date format, or even that there is a user. Perhaps we need to build some date handling functionality into mw.language or mw.util.
First step will be to retrieve the user's date format preference: mw.user.options.get( 'date' ) This will return one of the following: * default * mdy * dmy * ymd * ISO 8601
There's also a timecorrection preference that might be needed.
This looks like it's actually going to be rather difficult to fix as the formatting depends on having access to about 1500 formatting strings (5 formats x 300 languages) which currently aren't available on the client side. Siebrand says the i18n team is eventually going to implement a solution for this, but suggests in the meantime we work around the problem by having our API handle the formatting on the server-side. This will require some refactoring in PageTriage so it might be a little while before it gets implemented.
See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=43365 which involves tz correction
See also Brion on http://lists.wikimedia.org/pipermail/wikitech-l/2012-December/065400.html > I'm not sure if we have full localization for dates in JS... > > ...but you can use the browser's built-in support. You won't get the same > formatting, and it may not match the user's *time zone preference* in > MediaWiki... > > eg > https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toLocaleString