<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AGetMonthName</id>
	<title>API:GetMonthName - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AGetMonthName"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetMonthName&amp;action=history"/>
	<updated>2026-10-17T22:25:43Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:GetMonthName&amp;diff=30430&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetMonthName&amp;diff=30430&amp;oldid=prev"/>
		<updated>2026-10-16T19:44:28Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=Time}}&lt;br /&gt;
Returns the name of a month in the language of the computer&amp;#039;s regional settings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
name = GetMonthName(monthIndex, abbreviated)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;monthIndex : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Month, 1 (January) to 12 (December). Fractions are dropped.&lt;br /&gt;
;abbreviated : &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; – &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; for the short form of the name, &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; for the full name.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
;name : &amp;lt;code&amp;gt;wstring&amp;lt;/code&amp;gt; – The month name.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* The name comes from Windows&amp;#039; locale data for the current thread locale, not from the game&amp;#039;s string tables.&lt;br /&gt;
* If Windows cannot supply the name, an empty string is returned.&lt;br /&gt;
* With a &amp;lt;code&amp;gt;monthIndex&amp;lt;/code&amp;gt; outside 1–12 the client logs the &amp;#039;&amp;#039;Invalid month index&amp;#039;&amp;#039; error and returns nothing.&lt;br /&gt;
* &amp;lt;code&amp;gt;abbreviated&amp;lt;/code&amp;gt; must be a real boolean. Passing &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt; or a number raises an &amp;#039;&amp;#039;Invalid Parameters&amp;#039;&amp;#039; error.&lt;br /&gt;
* The function needs at least two arguments and only reads the last two.&lt;br /&gt;
* The stock UI never calls &amp;lt;code&amp;gt;GetMonthName&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
This is written to the UI log; the call returns normally.&lt;br /&gt;
* &amp;lt;code&amp;gt;Error in function call &amp;#039;GetMonthName&amp;#039;: Invalid month index.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
A minimal example built from the signature above:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local fullName  = GetMonthName( 3, false )&lt;br /&gt;
local shortName = GetMonthName( 3, true )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:GetYearMonthName|GetYearMonthName]]&lt;br /&gt;
* [[API:GetWeekDayName|GetWeekDayName]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>