https://en.wikipedia.org/w/index.php?action=history&feed=atom&title=Module%3ATitle_monthname Module:Title monthname - Revision history 2025-06-08T16:46:32Z Revision history for this page on the wiki MediaWiki 1.45.0-wmf.4 https://en.wikipedia.org/w/index.php?title=Module:Title_monthname&diff=1039155161&oldid=prev MusikBot II: Changed protection settings for "Module:Title monthname": High-risk template or module 6339 transclusions (more info) ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) 2021-08-17T01:26:09Z <p>Changed protection settings for &quot;<a href="/wiki/Module:Title_monthname" title="Module:Title monthname">Module:Title monthname</a>&quot;: <a href="/wiki/Wikipedia:High-risk_templates" title="Wikipedia:High-risk templates">High-risk template or module</a> 6339 transclusions (<a href="/wiki/User:MusikBot_II/TemplateProtector" title="User:MusikBot II/TemplateProtector">more info</a>) ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <tr class="diff-title" lang="en"> <td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 01:26, 17 August 2021</td> </tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div> </td></tr></table> MusikBot II https://en.wikipedia.org/w/index.php?title=Module:Title_monthname&diff=993451194&oldid=prev MusikBot II: Protected "Module:Title monthname": High-risk template or module (more info) ([Edit=Require autoconfirmed or confirmed access] (indefinite)) 2020-12-10T18:00:31Z <p>Protected &quot;<a href="/wiki/Module:Title_monthname" title="Module:Title monthname">Module:Title monthname</a>&quot;: <a href="/wiki/Wikipedia:High-risk_templates" title="Wikipedia:High-risk templates">High-risk template or module</a> (<a href="/wiki/User:MusikBot_II/TemplateProtector" title="User:MusikBot II/TemplateProtector">more info</a>) ([Edit=Require autoconfirmed or confirmed access] (indefinite))</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <tr class="diff-title" lang="en"> <td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 18:00, 10 December 2020</td> </tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div> </td></tr></table> MusikBot II https://en.wikipedia.org/w/index.php?title=Module:Title_monthname&diff=968019959&oldid=prev BrownHairedGirl: BrownHairedGirl moved page Module:Title month to Module:Title monthname without leaving a redirect: clearer description of purpose 2020-07-16T18:42:30Z <p>BrownHairedGirl moved page <a href="/w/index.php?title=Module:Title_month&amp;action=edit&amp;redlink=1" class="new" title="Module:Title month (page does not exist)">Module:Title month</a> to <a href="/wiki/Module:Title_monthname" title="Module:Title monthname">Module:Title monthname</a> without leaving a redirect: clearer description of purpose</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <tr class="diff-title" lang="en"> <td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 18:42, 16 July 2020</td> </tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div> </td></tr></table> BrownHairedGirl https://en.wikipedia.org/w/index.php?title=Module:Title_monthname&diff=968019801&oldid=prev BrownHairedGirl: create from sandboxed testing 2020-07-16T18:41:12Z <p>create from sandboxed testing</p> <p><b>New page</b></p><div>--[[ v1.00<br /> Split the page title into words then test each of them against<br /> the list of months.<br /> Optionally, an alternative page name may be supplied as a parameter.<br /> Return the first word which matches a months name ...<br /> unless the &quot;match=&quot; parameter specifies a diffreent match.<br /> If there is no match, then return an empty string ... unles<br /> the &quot;nomatch&quot; parameter specifies something different<br /> ]]<br /> <br /> local getArgs = require(&#039;Module:Arguments&#039;).getArgs<br /> local p = {}<br /> <br /> -- config<br /> local nomatch = &quot;&quot;<br /> local matchnum = 1<br /> <br /> local monthList = {<br /> &#039;January&#039;,<br /> &#039;February&#039;,<br /> &#039;March&#039;,<br /> &#039;April&#039;,<br /> &#039;May&#039;,<br /> &#039;June&#039;,<br /> &#039;July&#039;,<br /> &#039;August&#039;,<br /> &#039;September&#039;,<br /> &#039;October&#039;,<br /> &#039;November&#039;,<br /> &#039;December&#039;<br /> }<br /> <br /> -- splits a string into &quot;words&quot;<br /> -- a &quot;word&quot; is a set of characters delineated at each end by one <br /> -- or more whitespace characters or punctaution charaters<br /> function splitIntoWords(str)<br /> result = {}<br /> index = 1<br /> s = mw.ustring.gsub(str, &quot;^[%s%p]+&quot;, &quot;&quot;) -- strip leading whitespace or punctuation<br /> for s2 in mw.ustring.gmatch(s, &quot;[^%s%p]+[%s%p]*&quot;) do<br /> s3 = mw.ustring.gsub(s2, &quot;[%s%p]+$&quot;, &quot;&quot;) -- strip trailing separators<br /> result[index] = s3<br /> index = index + 1<br /> end<br /> return result<br /> end<br /> <br /> -- returns the first word is the pagename which matches the name of a month<br /> -- ... or an empty string if there is no match<br /> function checkPagename(pn)<br /> -- split the pagename into sparate words<br /> titleWords = splitIntoWords(pn)<br /> <br /> nMatches = 0<br /> myMatches ={}<br /> <br /> -- check each words in turn, to see if it matches a month<br /> for w, thisWord in ipairs(titleWords) do<br /> -- check agaist each month<br /> -- if there is a match, then return that monthname<br /> for i, thisMonth in ipairs(monthList) do<br /> if (thisMonth == thisWord) then<br /> nMatches = nMatches + 1<br /> myMatches[nMatches] = thisMonth<br /> end<br /> end<br /> end<br /> <br /> if (nMatches == 0) then<br /> -- none of the title words matches a whole month<br /> return nomatch<br /> end<br /> <br /> if ((matchnum &gt;= 1) and (matchnum &lt;= nMatches)) then<br /> return myMatches[matchnum]<br /> end<br /> <br /> if (matchnum &lt; 0) then<br /> matchnum = matchnum + 1 -- so that -1 is the last match etc<br /> if ((matchnum + nMatches) &gt;= 1) then<br /> return myMatches[matchnum + nMatches]<br /> end<br /> end<br /> <br /> -- if we get here, we have not found a match at the position specified by &quot;matchnum&quot;<br /> return nomatch<br /> end<br /> <br /> function p.main(frame)<br /> local args = getArgs(frame)<br /> return p._main(args)<br /> end<br /> <br /> function p._main(args)<br /> if (args[&#039;nomatch&#039;] ~= nil) then<br /> nomatch = args[&#039;nomatch&#039;]<br /> end<br /> <br /> -- by default, we return the first match<br /> -- but the optional &quot;C&quot; paarmeter sets the &quot;matchnum&quot; variable, which<br /> -- * for a positive matchnum &quot;n&quot;, returns the nth match if it exists<br /> -- * for a positive matchnum &quot;n&quot;, returns (if it exists) the nth match<br /> -- counting backwards from the end.<br /> -- So &quot;match=-1&quot; returns the last match<br /> -- and &quot;match=-3&quot; returns the 3rd-last match<br /> if (args[&#039;match&#039;] ~= nil) then<br /> matchnum = tonumber(args[&#039;match&#039;])<br /> if ((matchnum == nil) or (matchnum == 0)) then<br /> matchnum = 1<br /> end<br /> end<br /> <br /> -- by default, we use the current page<br /> -- but if the &quot;page=&quot; parameters is supplied, we use that<br /> -- so we try the parameter first<br /> thispagename = nil<br /> if ((args[&#039;page&#039;] ~= nil) and (args[&#039;page&#039;] ~= &quot;&quot;)) then<br /> -- we have a non-empty &quot;page&quot; parameter, so we use it<br /> thispagename = args[&#039;page&#039;]<br /> else<br /> -- get the page title<br /> thispage = mw.title.getCurrentTitle()<br /> thispagename = thispage.text;<br /> end<br /> <br /> -- now check the pagename to try to find a month ananme<br /> result = checkPagename(thispagename)<br /> if (result == &quot;&quot;) then<br /> return nomatch<br /> end<br /> return result<br /> end<br /> <br /> return p</div> BrownHairedGirl