Last modified: 2011-06-14 02:37:27 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 T2248, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 248 - $wgUseDynamicDates should work for other languages than English
$wgUseDynamicDates should work for other languages than English
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
All All
: Low enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on: 1668
  Show dependency treegraph
Reported: 2004-08-29 07:06 UTC by Ævar Arnfjörð Bjarmason
Modified: 2011-06-14 02:37 UTC (History)
6 users (show)

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

A (rough) proposal. (5.24 KB, patch)
2005-03-24 08:59 UTC, Ævar Arnfjörð Bjarmason

Description Ævar Arnfjörð Bjarmason 2004-08-29 07:06:40 UTC
Currently only users of the english Wikipedia can specify a date format of their
choice in preferences, that is they can have MediaWiki rewrite this "[[January
15]], [[2001]]" to:

*January 15, 2001
*15 January 2001
*2001 January 15

Though other languages usually only use one date format unlike english many such
as myself would rather have all dates in [[ISO 8601]].
Comment 1 Ævar Arnfjörð Bjarmason 2005-03-10 14:19:54 UTC
Making it depend on 1668 since it's logical to implement that first before work
can being on this one.
Comment 2 Ævar Arnfjörð Bjarmason 2005-03-24 08:59:58 UTC
Created attachment 379 [details]
A (rough) proposal.

A rough mockup of a proposal to solve this:
* date formats are read from $wgDateFormatsXx, this array should contain no
more than 100 items (10 is probably enough, please comment) where number 0 is
an indication of the default an 100 is the ISO 8601 formatted date. (perhaps it
would be better to not have it a number but iso => ...)
* The option is then set in the preferences which automatically display the
"Date format" option of the $wgDateFormatsXx array is not empty, however if the
language in question wishes to not use this at all they'll have to set
$wgDateFormatsXx = array();  because otherwise it'll be read from the parent
(usually Language.php)

Note that since the date format is set by numbers we could get drastic changes
between languages where e.g. item 3 in the array can mean something different
in de. and on en. and fo., I don't have a definite way solve this in a smart
manner we can'tguarentee that formats will be at all alike between languages
however this could be solved by using an associative array where some defaults
will always be the same:

$foo = array(
  default => something default here...
  long => "the standard long format for this language" (like en:"January 23,
2005" or is:"23. janúar 2005")
  abbrev => "the abbrivated format" (en:"Jan 23, 2005", "23. jan. 2005")
  numeric => "the standard numeric format: (en: 23.01.2005, is: 23/01/2005)
  iso => "the iso 8601 format" (all: 2005-01-23)

then of course each language could add something new using a key which is not
one of the reserved values.
Comment 3 Ævar Arnfjörð Bjarmason 2005-03-24 09:02:27 UTC
eep! i meant to post the above comment at [[bug 1668]], ignore it.
Comment 4 Happy-melon 2009-07-24 13:46:34 UTC
I *think* this was fixed eons ago...?? Certainly DateFormatter.php does take localised month names and other things it would need for localisation, and bug1668 was fixed over four years ago...
Comment 5 Niklas Laxström 2009-07-24 13:49:12 UTC
It isn't fixed. Fortunately nobody else seems want this except enwiki.
Comment 6 Happy-melon 2009-07-24 14:16:11 UTC
(In reply to comment #5)
> It isn't fixed. Fortunately nobody else seems want this except enwiki.

And they're now trying to get rid of it: [[Wikipedia:Full date unlinking]], etc. I think this will probably get closed as "meh"... :-D
Comment 7 p858snake 2011-04-30 00:09:53 UTC
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Comment 8 Mark A. Hershberger 2011-05-27 21:03:49 UTC
This is fixed, right? [[Wikipedia:Bots/Requests for approval/Full-date unlinking bot]]
Comment 9 Bawolff (Brian Wolff) 2011-05-27 21:33:08 UTC
(In reply to comment #8)
> This is fixed, right? [[Wikipedia:Bots/Requests for approval/Full-date
> unlinking bot]]

The poll at wikipedia has nothing to do with this. (Unless we want to just drop the feature on the basis of no one likes it).

Re-opening since nothing has changed since it was re-opened in comment 5.
Comment 10 Mark A. Hershberger 2011-05-28 00:57:54 UTC
(In reply to comment #9)
> (Unless we want to just drop
> the feature on the basis of no one likes it).

Sounds like that is what we should do, then.  Where can I start ripping?
Comment 11 Bawolff (Brian Wolff) 2011-05-28 03:15:26 UTC
>Sounds like that is what we should do, then.  Where can I start ripping?

It consists of about two lines in Parser.php (look for $this->mOptions->getUseDynamicDates() ). DateFormatter.php would still be needed for builtin {{#dateformat parser func afaik.

Currently the following wmf wikis have this option enabled: meta, enwikiquote, enwikibooks, enwiktionary, enwikinews, commonswiki, and testwiki. (note that en 'pedia is not on this list)

I personally know that enwikinews does not use this feature. We should probably figure out if any of the other wikis use it. From what I can tell, that only seems to be enwikiquote and commons (Since they're the only one with such date pages). It doesn't seem overly prominent on commons though, but is present.
Comment 12 Mark A. Hershberger 2011-06-14 00:18:20 UTC
WONTFIX re triage.
Comment 13 Mark A. Hershberger 2011-06-14 00:19:41 UTC
comments from triage, fwiw:

 * 2 questions. Should we add it for other langs? NO, PAIN IN THE TUCHUS
 * Should we remove for English? don't even wanna think about it.  Controversial feature. Don't wanna mess with it.
Comment 14 John Mark Vandenberg 2011-06-14 02:37:27 UTC
We need to think about it.  We need consistent date handling for all languages.  Are there other features in mediawiki which don't work for non-English languages?

Commons is the most problematic use of this feature, as it is a multilingual project.  I've started a discussion about this on Commons.

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