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

Content deleted Content added
Test pages: tests dealing with CS1 errors
Overview: commenting on or removing descriptions of functions no longer supported
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.
#'''<s>Big endian ref dates</s>''' &ndash;{{snd}}addsbutton now disabled. Users are invited to manually add {{para|cs1}} parameter to {{tl|Use dmy dates}} or {{tl|Use mdy dates}} causing applicable dates to be rendered in ''{{date|{{date}}|iso}}'' YMD format (underlying dates are not modified) <!-- 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)
#'''body dates to mdy''' &ndash; <s>no yyyy-mm-dd dates ("1978-07-14") converted</s> function withdrawn (WM software engine renders date formats automatically)
#'''ISO to dmy''' &ndash; only ''ISO-style'' dates within ref tags are converted
#'''ISO to mdy''' &ndash; only ''ISO-style'' dates within ref tags are converted -->
In addition, there are the following modes to convert slash or contracted dates into the desired format:
 
In addition, there are the following modes to convert slash or contracted dates into the desired format:
<!--
#'''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>
''*'''Note''': In these latter 42 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 than where the {{para|date}} parameter is used''
<!-- Commented out modes that have been removed
#'''Del year-in-X dates''' &ndash; unlinks the most common 'year-in-X' links
-->
''*'''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 than where the {{para|date}} parameter is used''
 
== History ==