<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mywikibiz.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AIsValidMonthName</id>
	<title>Module:IsValidMonthName - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mywikibiz.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AIsValidMonthName"/>
	<link rel="alternate" type="text/html" href="https://mywikibiz.com/index.php?title=Module:IsValidMonthName&amp;action=history"/>
	<updated>2026-06-14T15:07:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.3</generator>
	<entry>
		<id>https://mywikibiz.com/index.php?title=Module:IsValidMonthName&amp;diff=472348&amp;oldid=prev</id>
		<title>Zoran: Pywikibot 6.4.0</title>
		<link rel="alternate" type="text/html" href="https://mywikibiz.com/index.php?title=Module:IsValidMonthName&amp;diff=472348&amp;oldid=prev"/>
		<updated>2021-07-15T23:24:46Z</updated>

		<summary type="html">&lt;p&gt;Pywikibot 6.4.0&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--[[&lt;br /&gt;
    A simple module to check whether a supplied string is a valid name of a month&lt;br /&gt;
    in the Julian or Gregorian calendars.&lt;br /&gt;
--]]&lt;br /&gt;
&lt;br /&gt;
local IsValidMonthName = {}&lt;br /&gt;
&lt;br /&gt;
local FullMonthNames = {&lt;br /&gt;
    [&amp;quot;January&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;February&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;March&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;April&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;May&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;June&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;July&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;August&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;September&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;October&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;November&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;December&amp;quot;] = true&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local FullMonthNamesLowerCase = {&lt;br /&gt;
    [&amp;quot;january&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;february&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;march&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;april&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;may&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;june&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;july&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;august&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;september&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;october&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;november&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;december&amp;quot;] = true&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local ShortMonthNames = {&lt;br /&gt;
    [&amp;quot;Jan&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;Feb&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;Mar&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;Apr&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;May&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;Jun&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;Jul&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;Aug&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;Sep&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;Oct&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;Nov&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;Dec&amp;quot;] = true&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local ShortMonthNamesLowerCase = {&lt;br /&gt;
    [&amp;quot;jan&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;feb&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;mar&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;apr&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;may&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;jun&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;jul&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;aug&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;sep&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;oct&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;nov&amp;quot;] = true,&lt;br /&gt;
    [&amp;quot;dec&amp;quot;] = true&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- ############### Publicly accessible functions #######################&lt;br /&gt;
&lt;br /&gt;
-- if the parameter is a valid FULL name of a month, return &amp;quot;%validmonthname%&amp;quot;&lt;br /&gt;
-- Otherwise just return an empty string&lt;br /&gt;
function IsValidMonthName.isFullMonthName(frame)&lt;br /&gt;
	return doNameCheck(frame.args[1], frame.args[2], true, false)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- if the parameter is a valid SHORT name of a month, return &amp;quot;%validmonthname%&amp;quot;&lt;br /&gt;
-- Otherwise just return an empty string&lt;br /&gt;
function IsValidMonthName.isShortMonthName(frame)&lt;br /&gt;
	return doNameCheck(frame.args[1], frame.args[2], false, true)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- if the parameter is a valid FULL OR SHORT name of a month, return &amp;quot;%validmonthname%&amp;quot;&lt;br /&gt;
-- Otherwise just return an empty string&lt;br /&gt;
function IsValidMonthName.isMonthName(frame)&lt;br /&gt;
	return doNameCheck(frame.args[1], frame.args[2], true, true)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- ############### Private functions #######################&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function doNameCheck(s, caseArg, checkFull, checkShort)&lt;br /&gt;
	local ignoreCase = false&lt;br /&gt;
&lt;br /&gt;
	-- check for missing parameter&lt;br /&gt;
	if (s == nil) then&lt;br /&gt;
		return &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- check for empty parameter&lt;br /&gt;
	s = mw.text.trim(s)&lt;br /&gt;
	if (s == &amp;quot;&amp;quot;) then&lt;br /&gt;
		return &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
		&lt;br /&gt;
	if (caseArg ~= nil) then&lt;br /&gt;
		if (string.lower(caseArg) == &amp;quot;ignorecase&amp;quot;) then&lt;br /&gt;
			ignoreCase = true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if checkFull then&lt;br /&gt;
		if ((FullMonthNames[s] == true) and (not ignoreCase))&lt;br /&gt;
			or&lt;br /&gt;
		((FullMonthNamesLowerCase[string.lower(s)] == true) and (ignoreCase))&lt;br /&gt;
		then&lt;br /&gt;
			return s&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if checkShort then&lt;br /&gt;
		if ((ShortMonthNames[s] == true) and (not ignoreCase))&lt;br /&gt;
			or&lt;br /&gt;
		((ShortMonthNamesLowerCase[string.lower(s)] == true) and (ignoreCase))&lt;br /&gt;
		then&lt;br /&gt;
			return s&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return &amp;quot;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return IsValidMonthName&lt;/div&gt;</summary>
		<author><name>Zoran</name></author>
	</entry>
</feed>