Wikipedia:Manual of Style/Dates and numbers/Date autoformatting: Difference between revisions
Content deleted Content added
Autoformatting was implemented by wikilinking dates. |
m Reverted 1 edit by 75.169.75.65 (talk) to last revision by SMcCandlish. (TW) |
||
(46 intermediate revisions by 29 users not shown) | |||
Line 1:
{{
{{Rejected|date=September 2008<!--Consensus actually rejected this in two 2008 RfCs, reaffirmed in a followup in 2009, but the feature wasn't disabled until February 2013.-->|comment=<br/>'''The data autoformatting feature is [[mw:Manual:$wgUseDynamicDates|no longer part of the MediaWiki software]]'''}}
There are four possible formats to choose from:
* '''MonthName Day, Year''' as in January 15, 2001 (symbolized as MMMM dD, YYYY)
* '''Day MonthName Year''' as in 15 January 2001 (symbolized as dD MMMM YYYY)
Line 7 ⟶ 10:
* '''Year-MonthNumber-Day''' as in 2001-01-15 (symbolized as YYYY-MM-DD) Though not identified as such on the preferences page, this is the same way dates are displayed in [[ISO 8601]] format.
Dates that
Autoformatting dates has had several disadvantages:
* Its effects can only be seen by registered editors
** As a result, editors did not notice that the source code often had two (or possibly more) date formats in the same article, while most users saw inconsistent date formats on the same page.
** Some dates were entered in source code in one or more of the last two formats. While most editors did not notice this, most users saw a format that was much less familiar to them than either MDY or DMY.
* Autoformatting
* The last format, being most like ISO 8601, was sometimes referred to as ''being'' ISO format. However, ISO 8601 format implies use of the [[Gregorian calendar]], and Wikipedia normally uses the [[Julian calendar]] for historic dates before the adoption of the Gregorian calendar—all dates before 1582, many before 1752, and some as late as the twentieth century. <!--Dates before 1583 should not be wikilinked, lest they be autoformatted.|This is advice, not a statement of disadvantages--> Autoformatting into and out of this format could be misleading or erroneous for dates on the Julian Calendar, if one thought this format was truly ISO 8601.
The following information is provided to document how date autoformatting works.
Line 23 ⟶ 24:
'''A combination of a day and a month, plus optionally a year, is autoformatted by adding square brackets,''' such as in these examples:
The square brackets instruct the MediaWiki software to format the item according to
The following table shows how the autoformatting mechanism behaves. The preference settings that a
*<nowiki>[[2005 May 15]]</nowiki> *<nowiki>[[April 17, 1883]]</nowiki> ''will present'' "[[April 17, 1883]]"
to all users, regardless of their date preference (or non-preference).
*However <nowiki>[[May 15, 2005]]</nowiki>, ''but no other format'', will produce a wikilink to a separate page for [[May 15, 2005]]. This is true for all dates from [[January 1, 2003]] (retrieved by typing <nowiki>[[January 1, 2003]]</nowiki>) to [[July 31, 2005]].
<center>
Line 37 ⟶ 43:
| rowspan="2" | '''What you type'''
| colspan="5" | '''What logged-in registered users see<br>(settings on first row)'''
| rowspan="2" | '''What others will see''' <sup
|-
| January 15, 2001
Line 46 ⟶ 52:
|-
| <nowiki>[[May 15]]</nowiki>
| [[
| [[May 15|15 May]]
| [[May 15]]
| [[May 15]] | [[May 15]]
| [[May 15]] |-
| <nowiki>[[15 May]]</nowiki>
| [[
| [[May 15|15 May]]
| [[May 15|15 May]]
Line 62 ⟶ 68:
|-
| <nowiki>[[May 15]], [[2005]]</nowiki>
| [[
| [[May 15|15 May]] [[2005]]
| [[2005]] [[
| [[2005]]-[[May 15|05-15]]
| [[
| [[
|-
| <nowiki>[[15 May]] [[2005]]</nowiki>
| [[
| [[May 15|15 May]] [[2005]]
| [[2005]] [[
| [[2005]]-[[May 15|05-15]]
| [[May 15|15 May]] [[2005]]
| [[May 15|15 May]] [[2005]]
|-
| <nowiki>[[2005-05-15]]</nowiki> <sup
| [[
| [[May 15|15 May]] [[2005]]
| [[2005]] [[
| [[2005]]-[[May 15|05-15]]
| [[2005]]-[[May 15|05-15]]
| [[2005]]-[[May 15|05-15]]
|-
| align="left" colspan="8" |
|}
</center>
Line 91 ⟶ 97:
Even when surrounded by square brackets, those dates that do not contain both a day and a month—such as solitary months, solitary days of the week, solitary years, decades, centuries, and month-year combinations—are not autoformatted. One could make them links by using the standard piped-link notation, but the same advice applies here: such links should not be created unless they are of high value to the reader. (See [[WP:CONTEXT]].)
*Autoformatting
* Links to date ranges in the same calendar month, such as "
▲* Piped links to date elements, such as "<code><nowiki>[[20 June|the 20th of June]]</nowiki></code>" or "<code><nowiki>[[1997 in South African sport|1997]]</nowiki></code>". (Several forms of piped links break the date-formatting function.)
▲* Links to date ranges in the same calendar month, such as "<code><nowiki>[[December 13-17]]</nowiki></code>" or "<code><nowiki>the night of [[30/31 May]]</nowiki></code>". The autoformatting mechanism will output such dates in a damaged form: '''30/May 31''', etc.
Date elements on disambiguation pages and section headings should never be linked; the same applies to quotations, unless the original quote is linked.
[[Category:Wikipedia
|