This is a simple, brute-force, AWB script that finds adjacent {{para|day}} or {{para|date}}, and {{para|month}} and {{para|year}} parameters in CS1 citations and concatenates them into a single {{para|date}} parameter. The default category is {{cl|Pages containing cite templates with deprecated parameters}}.
The script does not do error checking, it simply captures the content of the various parameters and lumps them together.
Feel free to use and improve this script.
class="wikitable" style="margin: 1em auto 1em auto;"
|+revisions
!revision
!description
style="text-align: center;" |–
|initial release; {{para|day}} or {{para|date}}, {{para|month}}, and{{para|year}} must be adjacent to each other; if present these parameters must have a value
style="text-align: center;" |a
|parameter adjacency no longer required
style="text-align: center;" |b
|{{para|day}} and {{para|date}} may be empty; {{para|month}} and {{para|year}} must have a value
style="text-align: center;" |c
|Bugfix in month/year rules: script now fixes citations where {{para|month}} or {{para|year}} is the last parameter before the citation's closing }}
; Detects and removes empty {{para|date}}, {{para|day}}, {{para|month}}, and {{para|year}} parameters before making repairs which allowed for simplified month/year rules.
style="text-align: center;" |d
|Further bugfix in month/year rules to fix citations where {{para|year}} is the last parameter before the citation's closing }}
;
style="text-align: center;" |e
|Further bugfix in month/year rules to fix citations where {{para|month}} is the last parameter before the citation's closing }}
;
wikipedia
en
http://
Category:Pages containing cite templates with deprecated parameters
CategoryListProvider
true
false
false
false
({{\s*(?:[Cc]ite (?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|podcast|press release|sign|speech|techreport|thesis|web)|[Cc]itation)[^}]+)\|\s*date\s*=\s*(\|[^}]*)
$1$2
remove empty |date=
true
true
false
false
IgnoreCase
({{\s*(?:[Cc]ite (?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|podcast|press release|sign|speech|techreport|thesis|web)|[Cc]itation)[^}]+)\|\s*day\s*=\s*(\|[^}]*)
$1$2
remove empty |day=
true
true
false
false
IgnoreCase
({{\s*(?:[Cc]ite (?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|podcast|press release|sign|speech|techreport|thesis|web)|[Cc]itation)[^}]+)\|\s*month\s*=\s*(\|[^}]*)
$1$2
remove empty |date=
true
true
false
false
IgnoreCase
({{\s*(?:[Cc]ite (?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|podcast|press release|sign|speech|techreport|thesis|web)|[Cc]itation)[^}]+)\|\s*year\s*=\s*(\|[^}]*)
$1$2
remove empty |day=
true
true
false
false
IgnoreCase
({{\s*(?:[Cc]ite (?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|podcast|press release|sign|speech|techreport|thesis|web)|[Cc]itation)[^}]+)\|\s*da(?:te|y)\s*=\s*(\d{0,2}(?=\s*\|))([^}]*)\|\s*month\s*=\s*([A-Za-z\s]+\b)\.?(?=\s*\|)([^}]*?)\|\s*year\s*=\s*(\d{3,4})(?!\d)([^}]*)
$1|date=$2 $4 $6$3$5$7
d-x-m-x-y cite xxx
true
true
false
false
IgnoreCase
({{\s*(?:[Cc]ite (?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|podcast|press release|sign|speech|techreport|thesis|web)|[Cc]itation)[^}]+)\|\s*month\s*=\s*([A-Za-z\s]+\b)\.?(?=\s*\|)([^}]*)\s*\|\s*da(?:te|y)\s*=\s*(\d{0,2}(?=\s*\|))(\s*\|*\s*[^\|}]*)\s*\|\s*year\s*=\s*(\d{3,4})(?!\d)(\|?[^}]*)
$1|date=$4 $2 $6$3$5$7
m-x-d-x-y cite xxx
true
true
false
false
IgnoreCase
({{\s*(?:[Cc]ite (?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|podcast|press release|sign|speech|techreport|thesis|web)|[Cc]itation)[^}]+)\|\s*month\s*=\s*([A-Za-z\s]+\b)\.?(?=\s*\|)([^}]*?)\s*\|\s*year\s*=\s*(\d{3,4}[a-z]?)([^}]*?)\s*\|\s*da(?:te|y)\s*=\s*(\d{0,2}(?=\s*[\|\}]))([^}]*)
$1|date=$6 $2 $4$3$5$7
m-x-y-x-d cite xxx
true
true
false
false
IgnoreCase
({{\s*(?:[Cc]ite (?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|podcast|press release|sign|speech|techreport|thesis|web)|[Cc]itation)[^}]+)\|\s*year\s*=\s*(\d{3,4}[a-z]?)([^}]*?)\s*\|\s*month\s*=\s*([A-Za-z\s]+\b)\.?(?=\s*\|)([^}]*?)\s*\|\s*da(?:te|y)\s*=\s*(\d{0,2}(?=\s*[\|\}]))([^}]*)
$1|date=$6 $4 $2$3$5$7
y-x-m-x-d cite xxx
true
true
false
false
IgnoreCase
({{\s*(?:[Cc]ite (?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|podcast|press release|sign|speech|techreport|thesis|web)|[Cc]itation)[^}]+)\|\s*year\s*=\s*(\d{3,4}[a-z]?)([^}]*?)\s*\|\s*da(?:te|y)\s*=\s*(\d{0,2}(?=\s*\|))([^}]*?)\s*\|\s*month\s*=\s*([A-Za-z\s]+\b)\.?(?=\s*\|)(\s*[^}]*)
$1|date=$4 $6 $2$3$5$7
y-x-d-x-m cite xxx
true
true
false
false
IgnoreCase
({{\s*(?:[Cc]ite (?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|podcast|press release|sign|speech|techreport|thesis|web)|[Cc]itation)[^}]+)\|\s*da(?:te|y)\s*=\s*(\d{0,2}(?=\s*\|))([^}]*?)\s*\|\s*year\s*=\s*(\d{3,4}[a-z]?)([^}]*?)\s*\|\s*month\s*=\s*([A-Za-z\s]+\b)\.?(?=\s*\|)(\s*[^}]*)
$1|date=$2 $6 $4$3$5$7
d-x-y-x-m cite xxx
true
true
false
false
IgnoreCase
({{)(\s*(?:[Cc]ite (?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|podcast|press release|sign|speech|techreport|thesis|web)|[Cc]itation)[^}]+\|\s*da(?:te|y)\s*=[^}]*)
$1_PROTECTED_$2
protect citations with |date= or |day=
true
true
false
false
IgnoreCase
({{\s*(?:[Cc]ite (?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|podcast|press release|sign|speech|techreport|thesis|web)|[Cc]itation)[^}]+)\|\s*month\s*=\s*([A-Za-z\s]+\b)\.?\s*(?:[-/–,]|–)\s*([A-Za-z\s]+\b)\.?(?=\s*\|)([^}]*?)\s*\|\s*year\s*=\s*(\d{3,4})(?!\d)(\|?[^}]*)
$1|date=$2–$3 $5$4$6
m-m-x-y cite xxx
true
true
false
false
IgnoreCase
({{\s*(?:[Cc]ite (?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|podcast|press release|sign|speech|techreport|thesis|web)|[Cc]itation)[^}]+)\|\s*year\s*=\s*(\d{3,4}[a-z]?)([^}]*?)\s*\|\s*month\s*=\s*([A-Za-z\s]+\b)\.?\s*(?:[-/–,]|–)\s*([A-Za-z\s]+\b)\.?(?=\s*\|)(\|?[^}]*)
$1|date=$4–$5 $2$3$6
y-x-m-m cite xxx
true
true
false
false
IgnoreCase
({{\s*(?:[Cc]ite (?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|podcast|press release|sign|speech|techreport|thesis|web)|[Cc]itation)[^}]+)\|\s*month\s*=\s*(\d{1,2})\s+([A-Za-z\s]+\b)\.?(?=\s*\|)([^}]*?)\s*\|\s*year\s*=\s*(\d{3,4})(?!\d)(\|?[^}]*)
$1|date=$2 $3 $5$4$6
m_x_y cite xxx where |month=dd Mmmm
true
true
false
false
IgnoreCase
({{\s*(?:[Cc]ite (?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|podcast|press release|sign|speech|techreport|thesis|web)|[Cc]itation)[^}]+)\|\s*year\s*=\s*(\d{3,4}[a-z]?)([^}]*?)\s*\|\s*month\s*=\s*(\d{1,2})\s+([A-Za-z\s]+\b)\.?(?=\s*\|)(\|?[^}]*)
$1|date=$4 $5 $2$3$6
y_x_m cite xxx where |month=dd Mmmm
true
true
false
false
IgnoreCase
({{\s*(?:[Cc]ite (?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|podcast|press release|sign|speech|techreport|thesis|web)|[Cc]itation)[^}]+)\|\s*month\s*=\s*([A-Za-z\s]+\b)\.?\s+(\d{1,2}),?(?=\s*\|)([^}]*?)\s*\|\s*year\s*=\s*(\d{3,4})(?!\d)(\|?[^}]*)
$1|date=$2 $3, $5$4$6
m_x_y cite xxx where |month=Mmmm dd
true
true
false
false
IgnoreCase
({{\s*(?:[Cc]ite (?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|podcast|press release|sign|speech|techreport|thesis|web)|[Cc]itation)[^}]+)\|\s*year\s*=\s*(\d{3,4}[a-z]?)([^}]*?)\s*\|\s*month\s*=\s*([A-Za-z\s]+\b)[\.,]?\s+(\d{1,2}),?(?=\s*[\|}])(\|?[^}]*)
$1|date=$4 $5, $2$3$6
y_x_m cite xxx where |month=Mmmm dd
true
true
false
false
IgnoreCase
({{\s*(?:[Cc]ite (?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|podcast|press release|sign|speech|techreport|thesis|web)|[Cc]itation)[^}]*)\|\s*month\s*=\s*([A-Za-z\s]+\b)\.?(?=\s*\|)([^}]*?)\s*\|\s*year\s*=\s*(\d{3,4}[a-z]?(?=\s*(?:\||\})))(\s*[^\|}]*)
$1|date=$2 $4$3$5
m_x_y cite xxx
true
true
false
false
IgnoreCase
({{\s*(?:[Cc]ite (?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|podcast|press release|sign|speech|techreport|thesis|web)|[Cc]itation)[^}]+)\|\s*year\s*=\s*(\d{3,4}[a-z]?(?=\s*\|))([^}]*)\s*\|\s*month\s*=\s*([A-Za-z\s]+\b)\.?(?=\s*(?:\||\}))(\s*[^\|}]*)
$1|date=$4 $2$3$5
y_x_m cite xxx
true
true
false
false
IgnoreCase
({{)_PROTECTED_(\s*(?:[Cc]ite (?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|podcast|press release|sign|speech|techreport|thesis|web)|[Cc]itation)[^}]*)
$1$2
remove protection
true
true
false
false
IgnoreCase
false
true
false
false
false
false
0
0
false
false
false
false
false
true
2
5
500
true
false
false
30
Task 1e: Fix CS1 deprecated date parameter errors
clean up
re-categorisation per CFD
clean up and re-categorisation per CFD
removing category per CFD
subst:'ing
stub sorting
Typo fixing
bad link repair
Fixing links to disambiguation pages
Unicodifying
Task 1c: Fix CS1 deprecated date parameter errors (test)
Task 1c: Fix CS1 deprecated date parameter errors (Bot trial)
Task 1d: Fix CS1 deprecated date parameter errors
false
false
true
false
true
false
false
true
true
false
false
false
false
false
0
false
true
2
false
false
false
true
false
false
false
false
10
Courier New
false
false
false
false
false
true
false
false
false
false
true
true
true
true
false
false
true
true
false
true
false
false
false
false
false
false
false
false
false
true
false
false
false
false
false
C# 2.0
public string ProcessArticle(string ArticleText, string ArticleTitle, int wikiNamespace, out string Summary, out bool Skip)
{
Skip = false;
Summary = "test";
ArticleText = "test \r\n\r\n" + ArticleText;
return ArticleText;
}
false
false
true
false
20
0
true
true
false
false
false
0
0
0
0