I'd like to propose that an option be added to display years according to the BCE convention rather than the current BC one.
It looks like within DateFormatter.php,
NormalYear() will need to understand the extra option,
the switch statement within replace() will need to have a case for it,
and a new regex/key/target/rule will need to be added into DateFormatter().
Also, wfMsg("dateformat") will need to be updated appropriately.
Is there anything else I'm missing? Would anyone be willing to help me with this (I'm really loathe to start creating diffs until I understand the code better).
-Bill Clark
Bill Clark wrote:
I'd like to propose that an option be added to display years according to the BCE convention rather than the current BC one.
It looks like within DateFormatter.php,
NormalYear() will need to understand the extra option,
the switch statement within replace() will need to have a case for it,
and a new regex/key/target/rule will need to be added into DateFormatter().
Also, wfMsg("dateformat") will need to be updated appropriately.
Is there anything else I'm missing? Would anyone be willing to help me with this (I'm really loathe to start creating diffs until I understand the code better).
You could add another character to indicate BCE years instead of BC years, to replace "Y", and then you could add another date format for each of the 4 formats containing Y.
Another option, which may or may not be easier, would be to allow the Y character to indicate either BC or BCE. You could change the year regex to match either. You'd have another member variable in addition to mTarget to indicate which year format is desired. Then you could add code to the "Y" case in replace() to convert to the desired format.
Note that you'll need to change SpecialPreferences.php to add a checkbox and to set the option in User. You could probably put both date preferences into a single option field in User.
If the user has the "no preference" (DF_NONE) preference selected, if it was up to me I would ignore the BC/BCE checkbox and preserve whatever format is in the text. Use your judgement on that, people will complain either way.
-- Tim Starling
On Mon, 12 Jul 2004 11:50:19 +1000, Tim Starling ts4294967296@hotmail.com wrote:
Bill Clark wrote: If the user has the "no preference" (DF_NONE) preference selected, if it was up to me I would ignore the BC/BCE checkbox and preserve whatever format is in the text. Use your judgement on that, people will complain either way.
Before Christ, or Before Christian Era? Decisions decisions. ;)
On Mon, 12 Jul 2004 10:11:38 -0400, Fennec Foxen fennec@gmail.com wrote:
Before Christ, or Before Christian Era? Decisions decisions. ;)
Believe it or not, there are a great many people who get deeply offended by one or the other of the conventions. (And BCE is also -- and probably more often -- taken to mean "Before Common Era".) Also, just FYI, the "BCE" usage stems back to at least the 17th century (Rabbinic scholars) so this isn't just modern Political Correctness run amok.
Note: wikitech-l is almost certainly NOT the place to discuss the relative merits of the BCE convention... if you want to do that, I'd suggest doing so here: http://en.wikipedia.org/wiki/Wikipedia_talk:Manual_of_Style_%28dates_and_num...
Personally, I don't really care one way or the other (I have all my dates formats set to ISO anyway). But I do care about letting OTHER people choose to view dates using the format that is most preferable / least offensive to them.
In any event, I've completed the task of creating the necessary redirects from the BCE versions of dates to the appropriate articles for their BC counterparts. I'm currently going through the several hundred pages I've found so far that use the old-style [[301 BC|301 BCE]] date links and converting them to use the new-style [[301 BCE]] method. (If anyone wants to help with that, you can find the list at http://en.wikipedia.org/wiki/User:Wclark/BCE_fix )
Once I have some time (probably next couple days) I'll start poking through the code more so that I can create some diffs to implement the BCE option for date formatting.
-Bill Clark
wikitech-l@lists.wikimedia.org