Jump to content

විකිපීඩියා:Date formattings

විකිපීඩියා වෙතින්

Aim: to fix up all date references on Wikipedia so they are cromulent with the encyclopedia's manual of style for dates.

Note that this is a moving target – every day, hundreds (if not thousands) of incorrectly formatted/linked dates come into being. However, we do have tools to help us.

Wikipedia's manual of style for dates and numbers encourages consistency in formats used. As there are two permissible date formats used in running text in Wikipedia, articles will belong to one or other category. Thousands of articles have a mix of dmy and mdy date formats which need to be unified into one format or another.

Many articles with linked dates require cleanup to standardize the dates to a single format (either day month or month day, but not a mixture of both). It is the aim of this project, for future maintenance, to tag every article in mainspace as belonging to either "dmy" or "mdy". This tagging may be performed manually, or by scripts. The semi-automatic tools developed may also make date alignments to articles at the same time as putting non-displaying maintenance templates into articles.

Much of the donkey work of aligning date formats within the body of an article as well as the references sections can be performed using semi-automated tools.

Ongoing maintenance of date formats may one day be carried out by bots on articles already tagged with templates ({{use dmy dates}} or {{use mdy dates}}) which help to identify the correct format.

Potentially ambiguous dates, using slashes or full stops (6/7/1961, 12/07/1986, 6.7.1961, 12.07.1986) are re-appearing on some thousands of pages, despite being eradicated from the 'pedia a few years ago.

When running automated searches, beware rare false positives, for example:

Dates may exist in their 'full' form (i.e. September), or may be 'abbreviated' (i.e. shortened to three letters, such as 'Aug', or occasionally four, as in 'Sept'), with or without the trailing full stop. In many articles, there are a mixture of full and abbreviated forms.

Linking of dates and date fragments

[සංස්කරණය]

Consensus is that full dates ('20 April 2011'), day month ('20 April') or month day ('April 20'), years (2011) months ('April') and days of week ('Tuesday') should, except for timeline articles, only rarely be linked as per . Month–year combinations, generally Month Year or Year Month should not be linked.

Note:

  • Most instances of "March NNN" are likely to be racing car designations, not date fragments.
  • May 1968 is a redirect to May 1968 events in France and should be piped or changed to link to its target.

There are a large number of articles with indiscriminate linking of years. These include:

Irregular task: choose a year, date, month or day of week, click "what links here" and remove any undesirable links. Note that links can be piped links, or using the cite web template accessdate=February (replace with accessmonthday=February).

Other style changes

[සංස්කරණය]

In many cases centuries have been given an illegitimate capital C. or a capital for the ordinal e.g. Eighteenth. Also sentences starting with a numeral should be changed where possible, either by using words or by re-casting. The Oxford style manual recommends using words throughout.

Also look out for Roman numerals, especially in articles translated from the French.

  • Avoid changing case in titles of books or articles. (Except we convert all-caps titles as a matter of MoS anyway.)

We maintain provisional "whitelists" of articles which may have one or more valid links, please feel free to add new instances or remove any that are wrong.

Note a rough catch-all is Category:<something>calendar(s) and Category:Days, Months and Weeks


Autoformatting templates

[සංස්කරණය]

The community on the whole rejected the use of autoformatting. However, templates have been created which ostensibly work on "magic word" or other method to autoformat dates. Some are still in place:

  • {{date}}
  • {{#dateformat:16 December 2009}}

While the prevalence of the newer #dateformat is low, {{date}} is transcluded by thousands of articles and templates.

Some of the more common templates that also serve to allow date sorting or perform multiple formatting tasks.

Useful tools include:

  • The wiki itself:
    • What links here
    • Look for templates that format dates the wrong way. Fixing these can fix hundreds or thousands of pages at one go.
  • Date.js from User:Plastikspork
    spork_cite_to_mdy: changes 'date = YYYY-MM-DD' to 'date = Month DD, YYYY'
    spork_cite_to_dmy: changes 'date =YYYY-MM-DD' to 'date = DD Month YYYY'
    spork_cite_to_yyyymmdd: changes 'date = Month DD, YYYY' or 'date = DD Month YYYY' to 'date = YYYY-MM-DD'
  • MOSNUM dates.js – a comprehensive tool maintained by User:Ohconfucius based on scripts written by User:Lightmouse which can help make all date formats (dmy and mdy) consistent, whilst removing common errors and ambiguous date formats; it removes any links to dates or date fragments.
    Delinks all dates and date fragments, and converts them all to the same format, either dmy (20 April 2011) and mdy (April 20, 2011). Resolves unambiguous slash-dates (e.g. 7/7/1961, 23/07/1961, 07/23/61...). Optional functions:
    Del year-in-X dates – unlinks the most common piped 'year-in-X' links
    US-slash dates – resolves US style slash-dates (e.g. 7/27/1961, 07/27/1961, 07/27/61, 7/27/61) into mdy format
    UK-slash dates – resolves UK/European style slash-dates (e.g. 27/7/1961, 27/07/1961, 27/07/61, 27/7/61), or dates using the full stop as separator (e.g. 27.7.1961, 27.07.1961, 27.07.61, 27.7.61), into dmy format
    ISO to dmy – converting "yyyy-mm-dd" dates.[1][2]
    ISO to mdy – ditto
    Expand or abbreviate ref dates – (e.g. Apr 20, 2011 <-> April 20, 2011)
    See User:Ohconfucius/script/MOSNUM dates.
  • DateFix.js from User:Dl2000 – a stripped down and evolved version of the tool originally written by User:Ohconfucius; functions and tags for several English variants. Not maintained since 2011.

AutoWikiBrowser

[සංස්කරණය]

The AWB scripts below may be run as an imported module with the 'module' function of AWB. They are based on scripts originally written by Lightmouse, have the more basic functionalities of the scripts above. They strip out links of all dates and date fragments and also incorporate general style fixes.

Here is XML that solely unlinks "straight" links to days of week and months of year

  • JavaScript
    • For unlinking dates
    • For fixing xx/xx/xxxx dates

Potential false positives

[සංස්කරණය]
  • Direct quotes
  • Proper names (e.g. organisations, movements, book titles)
  • Names of images
  • Wikilinks (less of a problem – redirects can often be established)
  • URLs
  • Date ranges - when using automation, care must be taken with instances of date ranges such as '12–13 July', 'May 21–22', '12, 13, 14 and 15 July', or 'May 21, 22, 23 and 24; similarly, date ranges such as '12–13 July' ought not to be converted to '12–July 13'.
  • Also to note ranges may be separated by 'to', 'and', hyphens (-), endashes (–), emdashes (—), etc., and forms such as 17/18 January.
  • "the" is normally and properly removed before most dates (e.g. "the 12 December 1967"), but the article makes more sense to keep for certain phrases e.g. "... in the <date> issue of Time", "... during the <date> episode of Seinfeld." (usually involves reference to a periodical work)
  • Specialty abbreviations should not be confused with abbreviated months in limited cases:

Use AWB on the following lists:

Dated cleanup categories

[සංස්කරණය]
  1. ^ now retired User:Lightmouse wrote the original scripts to make date formats (dmy and mdy) consistent, whilst removing any links to dates or date fragments and without converting "yyyy-mm-dd" dates.
  2. ^ does not allow full ISO 8601 date formatting (e.g., with weeks or times added on), although the "yyyy-mm-dd" form, a subset of ISO 8601, is used here in en.WP. I use "ISO" in naming one of my script buttons only for convenience, because it really doesn't treat ISO dates other than "yyyy-mm-dd".
"https://si.wikipedia.org/w/index.php?title=විකිපීඩියා:Date_formattings&oldid=547615" වෙතින් සම්ප්‍රවේශනය කෙරිණි