Last modified: 2014-03-03 20:42:19 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T40079, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38079 - Transform date in the author line to user preference date format
Transform date in the author line to user preference date format
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
PageCuration (Other open bugs)
master
All All
: Low trivial (vote)
: ---
Assigned To: Nobody - You can work on this!
https://en.wikipedia.org/wiki/Special...
: i18n
: 39379 (view as bug list)
Depends on: 19992
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-29 07:23 UTC by Raimond Spekking
Modified: 2014-03-03 20:42 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Raimond Spekking 2012-06-29 07:23:03 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"
Comment 1 Ryan Kaldari 2012-09-19 18:40:40 UTC
*** Bug 39379 has been marked as a duplicate of this bug. ***
Comment 2 Ryan Kaldari 2012-09-19 18:44:21 UTC
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.
Comment 3 Ryan Kaldari 2012-09-19 19:11:30 UTC
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
Comment 4 Ryan Kaldari 2012-09-19 19:13:04 UTC
There's also a timecorrection preference that might be needed.
Comment 5 Ryan Kaldari 2012-09-19 21:34:48 UTC
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.
Comment 6 Nischay Nahata 2012-12-30 07:58:20 UTC
See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=43365 which involves tz correction
Comment 7 Nemo 2012-12-30 18:03:56 UTC
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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links