User:Ohconfucius/script/MOSNUM dates: Difference between revisions

Content deleted Content added
Known limitations: deprecated function
Overview: added buttons for slash dates
Line 24:
#'''all dates to dmy''' – dates in the body of the text as well as in the reference sections are converted to "14 July 1978" or similar.
#'''all dates to mdy''' – as above. dates are converted to "July 14, 1978" or similar.
#'''Big endian ref dates''' – Converts dates into [[Big-endian]] (yyyy-mm-dd) dates within the {{para|date}}, {{para|accessdate}}, {{para|archivedate}} parameters – mainly in references section*
<!-- Commented out modes that have been removed
#'''body dates to dmy''' &ndash; <s>no yyyy-mm-dd dates ("1978-07-14") converted</s> function withdrawn (WM software engine renders date formats automatically)
Line 31 ⟶ 32:
In addition, there are the following six modes to convert slash or contracted dates into the desired format:
 
#'''Del year-in-X dates''' &ndash; unlinks the most common 'year-in-X' links
#'''Expand ref dates''' &ndash; Expand month names within the references section
#'''Expand all dates''' &ndash; Expand month names elsewhere within the article
#'''US-slash dates''' &ndash; converts dates that use slash or decimal separators in formats commonly used in the USA into '''mdy''' dates ''viz'': <code>mm/dd/yy</code>, <code>mm/dd/yyyy</code>, <code>mm.dd.yy</code> or <code>mm.dd.yyyy</code>
#'''UK-slash dates''' &ndash; converts dates that use slash or decimal separators in formats commonly used in the UK, Europe and elsewhere into '''dmy''' dates ''viz'': <code>dd/mm/yy</code>, <code>dd/mm/yyyy</code>, <code>dd.mm.yy</code> or <code>dd.mm.yyyy</code>
<!-- Commented out modes that have been removed
#'''Del year-in-X dates''' &ndash; unlinks the most common 'year-in-X' links
#'''Big endian ref dates''' &ndash; Converts dates into [[Big-endian]] (yyyy-mm-dd) dates within the {{para|date}}, {{para|accessdate}}, {{para|archivedate}} parameters – mainly in references section*
-->
''*'''Note''': In these latter 4 cases, false positives are more likely because the protection mechanism of the script is bypassed, meaning the regex will act on dates in instances other templatesthan where the {{para|date}} parameter is used''
 
== History ==