<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=R1k3</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=R1k3"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/R1k3"/>
	<updated>2026-05-03T00:03:01Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetEasterDate&amp;diff=41557</id>
		<title>GetEasterDate</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetEasterDate&amp;diff=41557"/>
		<updated>2014-08-21T17:32:03Z</updated>

		<summary type="html">&lt;p&gt;R1k3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;pageclass class=&amp;quot;#228B22&amp;quot; subcaption=&amp;quot;Useful Function&amp;quot;&amp;gt;&amp;lt;/pageclass&amp;gt;&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function calculates the easter date of a given year.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int int getEasterDate( int year )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''year''': The year with which the date will be calculated&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two integer representing the monthday and the month of the easter date.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside Script&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getEaster(year)&lt;br /&gt;
    local y = tonumber(year)&lt;br /&gt;
    local M = 24&lt;br /&gt;
    local N = 5&lt;br /&gt;
    local a = y%19&lt;br /&gt;
    local b = y%4&lt;br /&gt;
&lt;br /&gt;
    local c = y%7 &lt;br /&gt;
    local d = (19*a+M)%30 &lt;br /&gt;
    local e = (2*b+4*c+6*d+N)%7 &lt;br /&gt;
    local dayMar = 22+d+e&lt;br /&gt;
    local dayApr = d+e-9&lt;br /&gt;
&lt;br /&gt;
    if dayMar &amp;gt; 31 then&lt;br /&gt;
        return dayApr, 4&lt;br /&gt;
    else&lt;br /&gt;
        return dayMar, 3&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside Script&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example calculate the date with a command.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;easter&amp;quot;,function(source, cmd, year)&lt;br /&gt;
    local day, month = getEaster(year) &lt;br /&gt;
    outputChatBox(&amp;quot;Easter &amp;quot;..year..&amp;quot;: &amp;quot;..day..&amp;quot;.&amp;quot;..month)&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Useful Functions]]&lt;/div&gt;</summary>
		<author><name>R1k3</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetEasterDate&amp;diff=41556</id>
		<title>GetEasterDate</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetEasterDate&amp;diff=41556"/>
		<updated>2014-08-21T17:30:18Z</updated>

		<summary type="html">&lt;p&gt;R1k3: This function calculates the easter date of a given year.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pageclass class=&amp;quot;#228B22&amp;quot; subcaption=&amp;quot;Useful Function&amp;quot;&amp;gt;&amp;lt;/pageclass&amp;gt;&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function calculates the easter date of a given year.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int int getEasterDate( int year )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''year''': The year with which the date will be calculated&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two integer representing the monthday and the month of the easter date.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside Script&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getEaster(year)&lt;br /&gt;
    local y = tonumber(year)&lt;br /&gt;
    local M = 24&lt;br /&gt;
    local N = 5&lt;br /&gt;
    local a = y%19&lt;br /&gt;
    local b = y%4&lt;br /&gt;
&lt;br /&gt;
    local c = y%7 &lt;br /&gt;
    local d = (19*a+M)%30 &lt;br /&gt;
    local e = (2*b+4*c+6*d+N)%7 &lt;br /&gt;
    local dayMar = 22+d+e&lt;br /&gt;
    local dayApr = d+e-9&lt;br /&gt;
&lt;br /&gt;
    if dayMar &amp;gt; 31 then&lt;br /&gt;
        return dayApr, 4&lt;br /&gt;
    else&lt;br /&gt;
        return dayMar, 3&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside Script&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example calculate the date with a command.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;easter&amp;quot;,function(source, cmd, year)&lt;br /&gt;
    local day, month = getEaster(year) &lt;br /&gt;
    outputChatBox(&amp;quot;Easter &amp;quot;..year..&amp;quot;: &amp;quot;..day..&amp;quot;.&amp;quot;..month)&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Useful Functions]]&lt;/div&gt;</summary>
		<author><name>R1k3</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetEasterDate&amp;diff=41555</id>
		<title>GetEasterDate</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetEasterDate&amp;diff=41555"/>
		<updated>2014-08-21T17:21:23Z</updated>

		<summary type="html">&lt;p&gt;R1k3: Created page with &amp;quot;&amp;lt;pageclass class=&amp;quot;#228B22&amp;quot; subcaption=&amp;quot;Useful Function&amp;quot;&amp;gt;&amp;lt;/pageclass&amp;gt; &amp;lt;lowercasetitle/&amp;gt; __NOTOC__ This function calculates the easter date of a given year. &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;  ==Synt...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pageclass class=&amp;quot;#228B22&amp;quot; subcaption=&amp;quot;Useful Function&amp;quot;&amp;gt;&amp;lt;/pageclass&amp;gt;&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function calculates the easter date of a given year.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int int getEasterDate( int year )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''year''': The year with which the date will be calculated&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two integer representing the monthday and the month of the easter date.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside Script&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getEaster(year)&lt;br /&gt;
    local y = tonumber(year)&lt;br /&gt;
    local M = 24&lt;br /&gt;
    local N = 5&lt;br /&gt;
    local a = y%19&lt;br /&gt;
    local b = y%4&lt;br /&gt;
&lt;br /&gt;
    local c = y%7 &lt;br /&gt;
    local d = (19*a+M)%30 &lt;br /&gt;
    local e = (2*b+4*c+6*d+N)%7 &lt;br /&gt;
    local dayMar = 22+d+e&lt;br /&gt;
    local dayApr = d+e-9&lt;br /&gt;
&lt;br /&gt;
    if dayMar &amp;gt; 31 then&lt;br /&gt;
        return dayApr, 4&lt;br /&gt;
    else&lt;br /&gt;
        return dayMar, 3&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside Script&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example calculate the date with a command.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;easter&amp;quot;,function(source, cmd, year)&lt;br /&gt;
    local day, month = getEaster(year) &lt;br /&gt;
    outputChatBox(&amp;quot;Easter &amp;quot;..year..&amp;quot;: &amp;quot;..day..&amp;quot;.&amp;quot;..month)&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Useful Functions]]&lt;/div&gt;</summary>
		<author><name>R1k3</name></author>
	</entry>
</feed>