<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.pantonianrepublic.com/index.php?action=history&amp;feed=atom&amp;title=Module%3APerson_date</id>
	<title>Module:Person date - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pantonianrepublic.com/index.php?action=history&amp;feed=atom&amp;title=Module%3APerson_date"/>
	<link rel="alternate" type="text/html" href="https://wiki.pantonianrepublic.com/index.php?title=Module:Person_date&amp;action=history"/>
	<updated>2026-04-19T22:17:51Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.0</generator>
	<entry>
		<id>https://wiki.pantonianrepublic.com/index.php?title=Module:Person_date&amp;diff=6822&amp;oldid=prev</id>
		<title>Django07: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.pantonianrepublic.com/index.php?title=Module:Person_date&amp;diff=6822&amp;oldid=prev"/>
		<updated>2026-02-07T01:08:11Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:08, 7 February 2026&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key wiki:diff::1.12:old-6632:rev-6822 --&gt;
&lt;/table&gt;</summary>
		<author><name>Django07</name></author>
	</entry>
	<entry>
		<id>https://wiki.pantonianrepublic.com/index.php?title=Module:Person_date&amp;diff=6632&amp;oldid=prev</id>
		<title>Django07: Created page with &quot;require(&quot;strict&quot;)  local p = {}  local TEMPLATES = { 	birth_date = &quot;Birth date&quot;, 	birth_date_and_age = &quot;Birth date and age&quot;, 	birth_year = &quot;Birth year&quot;, 	birth_year_and_age = &quot;Birth year and age&quot;, 	death_date = &quot;Death date&quot;, 	death_date_text = &quot;Death date text&quot;, 	death_date_and_age = &quot;Death date and age&quot;, 	death_year = &quot;Death year&quot;, 	death_year_and_age = &quot;Death year and age&quot;, } local invalid_date_category = &#039;&#039; local tracking_category = &#039;&#039; local Date = require(&#039;Module:Dat...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.pantonianrepublic.com/index.php?title=Module:Person_date&amp;diff=6632&amp;oldid=prev"/>
		<updated>2026-01-08T16:05:47Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;require(&amp;quot;strict&amp;quot;)  local p = {}  local TEMPLATES = { 	birth_date = &amp;quot;Birth date&amp;quot;, 	birth_date_and_age = &amp;quot;Birth date and age&amp;quot;, 	birth_year = &amp;quot;Birth year&amp;quot;, 	birth_year_and_age = &amp;quot;Birth year and age&amp;quot;, 	death_date = &amp;quot;Death date&amp;quot;, 	death_date_text = &amp;quot;Death date text&amp;quot;, 	death_date_and_age = &amp;quot;Death date and age&amp;quot;, 	death_year = &amp;quot;Death year&amp;quot;, 	death_year_and_age = &amp;quot;Death year and age&amp;quot;, } local invalid_date_category = &amp;#039;&amp;#039; local tracking_category = &amp;#039;&amp;#039; local Date = require(&amp;#039;Module:Dat...&amp;quot;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:05, 8 January 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l39&quot;&gt;Line 39:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 39:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	end&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	-- TODO: Date has not been parsed. Need to work out what to do. For now, throw an error.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	-- TODO: Date has not been parsed. Need to work out what to do. For now, throw an error.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	-- Example where this can occur: &amp;quot;birth_date = &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;22 December &lt;/del&gt;1946&amp;quot; at [[Maurice Pasternak]].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	-- Example where this can occur: &amp;quot;birth_date = &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;22 December &lt;/ins&gt;1946&amp;quot; at [[Maurice Pasternak]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	-- There was a nonbreaking space after &amp;quot;22&amp;quot; whidh Date does not accept.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	-- There was a nonbreaking space after &amp;quot;22&amp;quot; whidh Date does not accept.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	error(&amp;#039;Module:Person_date parse_date invalid date: &amp;quot;&amp;#039; .. tostring(str) .. &amp;#039;&amp;quot;&amp;#039;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	error(&amp;#039;Module:Person_date parse_date invalid date: &amp;quot;&amp;#039; .. tostring(str) .. &amp;#039;&amp;quot;&amp;#039;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff::1.12:old-6842:rev-6632 --&gt;
&lt;/table&gt;</summary>
		<author><name>Django07</name></author>
	</entry>
	<entry>
		<id>https://wiki.pantonianrepublic.com/index.php?title=Module:Person_date&amp;diff=6842&amp;oldid=prev</id>
		<title>wikipedia&gt;Zackmann08: no longer needed or supported</title>
		<link rel="alternate" type="text/html" href="https://wiki.pantonianrepublic.com/index.php?title=Module:Person_date&amp;diff=6842&amp;oldid=prev"/>
		<updated>2025-12-06T07:51:53Z</updated>

		<summary type="html">&lt;p&gt;no longer needed or supported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 07:51, 6 December 2025&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key wiki:diff::1.12:old-6821:rev-6842 --&gt;
&lt;/table&gt;</summary>
		<author><name>wikipedia&gt;Zackmann08</name></author>
	</entry>
	<entry>
		<id>https://wiki.pantonianrepublic.com/index.php?title=Module:Person_date&amp;diff=6821&amp;oldid=prev</id>
		<title>wikipedia&gt;Zackmann08: no longer needed or supported</title>
		<link rel="alternate" type="text/html" href="https://wiki.pantonianrepublic.com/index.php?title=Module:Person_date&amp;diff=6821&amp;oldid=prev"/>
		<updated>2025-12-06T07:51:53Z</updated>

		<summary type="html">&lt;p&gt;no longer needed or supported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require(&amp;quot;strict&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local TEMPLATES = {&lt;br /&gt;
	birth_date = &amp;quot;Birth date&amp;quot;,&lt;br /&gt;
	birth_date_and_age = &amp;quot;Birth date and age&amp;quot;,&lt;br /&gt;
	birth_year = &amp;quot;Birth year&amp;quot;,&lt;br /&gt;
	birth_year_and_age = &amp;quot;Birth year and age&amp;quot;,&lt;br /&gt;
	death_date = &amp;quot;Death date&amp;quot;,&lt;br /&gt;
	death_date_text = &amp;quot;Death date text&amp;quot;,&lt;br /&gt;
	death_date_and_age = &amp;quot;Death date and age&amp;quot;,&lt;br /&gt;
	death_year = &amp;quot;Death year&amp;quot;,&lt;br /&gt;
	death_year_and_age = &amp;quot;Death year and age&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
local invalid_date_category = &amp;#039;&amp;#039;&lt;br /&gt;
local tracking_category = &amp;#039;&amp;#039;&lt;br /&gt;
local Date = require(&amp;#039;Module:Date&amp;#039;)._Date&lt;br /&gt;
local getArgs = require(&amp;#039;Module:Arguments&amp;#039;).getArgs&lt;br /&gt;
&lt;br /&gt;
if mw.title.getCurrentTitle():inNamespaces(0, 828, 829) then&lt;br /&gt;
	-- Category only in namespaces: 0=article, 828=module &amp;amp; 829=module talk (last 2 needed for testcases)&lt;br /&gt;
	tracking_category = &amp;#039;[[Category:Pages where birth or death is being automatically determined]]&amp;#039;&lt;br /&gt;
	invalid_date_category = &amp;#039;[[Category:Pages with invalid birth or death dates]]&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function check_for_invalid_date(str)&lt;br /&gt;
	return mw.ustring.match(str, &amp;#039;^%?&amp;#039;) or mw.ustring.match(str, &amp;#039;^%d%d%?&amp;#039;) or mw.ustring.match(str, &amp;#039;^[Uu]nk&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function expand_template(template, args)&lt;br /&gt;
	return mw.getCurrentFrame():expandTemplate{title = template, args = args}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function parse_date(str)&lt;br /&gt;
	local date = Date(str)&lt;br /&gt;
	if date then&lt;br /&gt;
		return tostring(date.year), tostring(date.month), tostring(date.day)&lt;br /&gt;
	end&lt;br /&gt;
	-- TODO: Date has not been parsed. Need to work out what to do. For now, throw an error.&lt;br /&gt;
	-- Example where this can occur: &amp;quot;birth_date = 22 December 1946&amp;quot; at [[Maurice Pasternak]].&lt;br /&gt;
	-- There was a nonbreaking space after &amp;quot;22&amp;quot; whidh Date does not accept.&lt;br /&gt;
	error(&amp;#039;Module:Person_date parse_date invalid date: &amp;quot;&amp;#039; .. tostring(str) .. &amp;#039;&amp;quot;&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function date_format(str)&lt;br /&gt;
	if mw.ustring.match (str, &amp;#039;^%d+%s*%a+[%.]*%s*%d%d%d%d$&amp;#039;) then&lt;br /&gt;
		return &amp;#039;df&amp;#039;&lt;br /&gt;
	elseif mw.ustring.match(str, &amp;#039;^%a+[%.]*%s+%d+,%s*%d%d%d%d$&amp;#039;) then&lt;br /&gt;
		return &amp;#039;mf&amp;#039;&lt;br /&gt;
	else&lt;br /&gt;
		return &amp;#039;ERROR&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function is_valid_month (str)&lt;br /&gt;
	str = string.upper(mw.ustring.sub(str,1,1))..string.lower(mw.ustring.sub(str,2))&lt;br /&gt;
&lt;br /&gt;
	local months = {&amp;#039;Jan&amp;#039;,&amp;#039;Jan.&amp;#039;,&amp;#039;January&amp;#039;,&amp;#039;Feb&amp;#039;,&amp;#039;Feb.&amp;#039;,&amp;#039;February&amp;#039;,&amp;#039;Mar&amp;#039;,&amp;#039;March&amp;#039;,&amp;#039;Apr&amp;#039;,&amp;#039;Apr.&amp;#039;,&amp;#039;April&amp;#039;,&amp;#039;May&amp;#039;,&amp;#039;Jun&amp;#039;,&amp;#039;Jun.&amp;#039;,&amp;#039;June&amp;#039;,&amp;#039;Jul&amp;#039;,&amp;#039;Jul.&amp;#039;,&amp;#039;July&amp;#039;,&amp;#039;Aug&amp;#039;,&amp;#039;Aug.&amp;#039;,&amp;#039;August&amp;#039;,&amp;#039;Sep&amp;#039;,&amp;#039;Sept&amp;#039;,&amp;#039;Sep.&amp;#039;,&amp;#039;Sept.&amp;#039;,&amp;#039;September&amp;#039;,&amp;#039;Oct&amp;#039;,&amp;#039;Oct.&amp;#039;,&amp;#039;October&amp;#039;,&amp;#039;Nov&amp;#039;,&amp;#039;Nov&amp;#039;,&amp;#039;November&amp;#039;,&amp;#039;Dec&amp;#039;,&amp;#039;Dec.&amp;#039;,&amp;#039;December&amp;#039;}&lt;br /&gt;
	for index, value in ipairs(months) do&lt;br /&gt;
		if value == str then&lt;br /&gt;
			return true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function is_month_year_only(str)&lt;br /&gt;
	local month = mw.ustring.match(str, &amp;#039;^(%a+)[%.]*%s+%d%d%d%d$&amp;#039;)&lt;br /&gt;
	if month == nil then&lt;br /&gt;
		return false&lt;br /&gt;
	else&lt;br /&gt;
		return is_valid_month(month)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function is_valid_date(str)&lt;br /&gt;
	local month = mw.ustring.match (str, &amp;#039;^%d+%s*(%a+)[%.]*%s*%d%d%d%d$&amp;#039;) or mw.ustring.match(str, &amp;#039;^(%a+)[%.]*%s+%d+,%s*%d%d%d%d$&amp;#039;)&lt;br /&gt;
	if month == nil then&lt;br /&gt;
		return false&lt;br /&gt;
	else&lt;br /&gt;
		return is_valid_month(month)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function is_year_only(str)&lt;br /&gt;
	return mw.ustring.match(str, &amp;#039;^%d%d%d%d$&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function already_has_template(str)&lt;br /&gt;
	str = mw.ustring.gsub(str, &amp;#039;&amp;amp;[Nn][Bb][Ss][Pp];&amp;#039;, &amp;#039; &amp;#039;)&lt;br /&gt;
	return mw.ustring.match(str, &amp;#039;&amp;lt;span&amp;#039;) or mw.ustring.match(str, &amp;#039;&amp;lt;time&amp;#039;) or mw.ustring.match(str,&amp;#039;%(aged%s*%d+&amp;#039;) or mw.ustring.match(str,&amp;#039;%(age%s*%d+&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function sanatize_date(str)&lt;br /&gt;
	-- Sanatize leading &amp;amp; trailing whitespace (this caused an issue before it was implemented)&lt;br /&gt;
	str = mw.ustring.gsub(str,&amp;#039;^%s*&amp;#039;,&amp;#039;&amp;#039;)&lt;br /&gt;
	str = mw.ustring.gsub(str,&amp;#039;%s*$&amp;#039;,&amp;#039;&amp;#039;)&lt;br /&gt;
	-- Sanatize ordinals&lt;br /&gt;
	str = mw.ustring.gsub(str, &amp;#039;(%d+)st([,%s])&amp;#039;, &amp;#039;%1%2&amp;#039;)&lt;br /&gt;
	str = mw.ustring.gsub(str, &amp;#039;(%d+)rd([,%s])&amp;#039;, &amp;#039;%1%2&amp;#039;)&lt;br /&gt;
	str = mw.ustring.gsub(str, &amp;#039;(%d+)th([,%s])&amp;#039;, &amp;#039;%1%2&amp;#039;)&lt;br /&gt;
	str = mw.ustring.gsub(str, &amp;#039;(%d+)nd([,%s])&amp;#039;, &amp;#039;%1%2&amp;#039;)&lt;br /&gt;
	return str&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function parse_birth(args)&lt;br /&gt;
	local birth_date = args[&amp;#039;birth_date&amp;#039;] or &amp;#039;&amp;#039;&lt;br /&gt;
	local death_date = args[&amp;#039;death_date&amp;#039;] or &amp;#039;&amp;#039;&lt;br /&gt;
	local disap_date = args[&amp;#039;disappeared_date&amp;#039;] or &amp;#039;&amp;#039;&lt;br /&gt;
	local original = birth_date&lt;br /&gt;
	&lt;br /&gt;
	birth_date = sanatize_date(birth_date)&lt;br /&gt;
	death_date = sanatize_date(death_date)&lt;br /&gt;
	disap_date = sanatize_date(disap_date)&lt;br /&gt;
&lt;br /&gt;
	-- Check for bad inputs. This used to be covered by a switch statement in infoboxes&lt;br /&gt;
	if check_for_invalid_date(birth_date) then&lt;br /&gt;
		return original..invalid_date_category&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if already_has_template(birth_date) then&lt;br /&gt;
		return original&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if is_valid_date(birth_date) then&lt;br /&gt;
		local location = mw.ustring.find(birth_date, &amp;#039;%d%d%d%d&amp;#039;)&lt;br /&gt;
		local extra = mw.ustring.sub(birth_date, location+4) .. tracking_category&lt;br /&gt;
		local date = mw.ustring.sub(birth_date, 1,location+3)&lt;br /&gt;
		local year, month, day = parse_date(date)&lt;br /&gt;
		local format = date_format(date)&lt;br /&gt;
		if death_date == &amp;#039;&amp;#039; and disap_date == &amp;#039;&amp;#039; then&lt;br /&gt;
			return expand_template(TEMPLATES.birth_date_and_age, {year, month, day, [format] = &amp;#039;yes&amp;#039;}) .. extra&lt;br /&gt;
		elseif is_year_only(death_date) or is_valid_date(death_date) or is_month_year_only(death_date) then&lt;br /&gt;
			return expand_template(TEMPLATES.birth_date, {year, month, day, [format] = &amp;#039;yes&amp;#039;}) .. extra&lt;br /&gt;
		else&lt;br /&gt;
			-- death_date is not a valid string (example: &amp;#039;unknown&amp;#039;)&lt;br /&gt;
			return original&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if is_month_year_only(birth_date) then&lt;br /&gt;
&lt;br /&gt;
		local year = Date(&amp;#039;1 &amp;#039;..birth_date):text(&amp;#039;%Y&amp;#039;)&lt;br /&gt;
		local month = Date(&amp;#039;1 &amp;#039;..birth_date):text(&amp;#039;%-m&amp;#039;)&lt;br /&gt;
		local location = mw.ustring.find(birth_date, &amp;#039;%d%d%d%d&amp;#039;)&lt;br /&gt;
		local date = mw.ustring.sub(birth_date, 1,location+3)&lt;br /&gt;
		local extra = mw.ustring.sub(birth_date, location+4) .. tracking_category&lt;br /&gt;
&lt;br /&gt;
		if death_date == &amp;#039;&amp;#039; and disap_date == &amp;#039;&amp;#039; then&lt;br /&gt;
			return expand_template(TEMPLATES.birth_year_and_age, {year, month}) .. extra&lt;br /&gt;
		elseif is_year_only(death_date) or is_valid_date(death_date) or is_month_year_only(death_date) then&lt;br /&gt;
			return expand_template(TEMPLATES.birth_year, {date}) .. extra&lt;br /&gt;
		else&lt;br /&gt;
			-- death_date is not a valid string (example: &amp;#039;unknown&amp;#039;)&lt;br /&gt;
			return original&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
	end&lt;br /&gt;
	if is_year_only(birth_date) then&lt;br /&gt;
		local date = mw.ustring.sub(birth_date, 1, 5)&lt;br /&gt;
		local extra = mw.ustring.sub(birth_date, 5) .. tracking_category&lt;br /&gt;
		if death_date == &amp;#039;&amp;#039; and disap_date == &amp;#039;&amp;#039; then&lt;br /&gt;
			return expand_template(TEMPLATES.birth_year_and_age, {date}) .. extra&lt;br /&gt;
		elseif is_year_only(death_date) or is_valid_date(death_date) then&lt;br /&gt;
			return expand_template(TEMPLATES.birth_year, {date}) .. extra&lt;br /&gt;
		else&lt;br /&gt;
			-- death_date is not a valid string (example: &amp;#039;unknown&amp;#039;)&lt;br /&gt;
			return original&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return original&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function parse_death(args)&lt;br /&gt;
	local birth_date = args[&amp;#039;birth_date&amp;#039;] or &amp;#039;&amp;#039;&lt;br /&gt;
	local death_date = args[&amp;#039;death_date&amp;#039;] or &amp;#039;&amp;#039;&lt;br /&gt;
	local original = death_date&lt;br /&gt;
&lt;br /&gt;
	birth_date = sanatize_date(birth_date)&lt;br /&gt;
	death_date = sanatize_date(death_date)&lt;br /&gt;
&lt;br /&gt;
	-- Check for bad inputs. This used to be covered by a switch statement in infoboxes&lt;br /&gt;
	if check_for_invalid_date(death_date) then&lt;br /&gt;
		return original..invalid_date_category&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if already_has_template(death_date) then&lt;br /&gt;
		return original&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if is_valid_date(death_date) or is_month_year_only(death_date) then&lt;br /&gt;
		local location = mw.ustring.find(death_date, &amp;#039;%d%d%d%d&amp;#039;)&lt;br /&gt;
		local date = mw.ustring.sub(death_date, 1,location+3)&lt;br /&gt;
		local extra = mw.ustring.sub(death_date, location+4) .. tracking_category&lt;br /&gt;
		local format = date_format(date)&lt;br /&gt;
&lt;br /&gt;
		if birth_date == &amp;#039;&amp;#039; then&lt;br /&gt;
			if is_month_year_only(death_date) then&lt;br /&gt;
				return expand_template(TEMPLATES.death_date_text, {date}) .. extra&lt;br /&gt;
			end&lt;br /&gt;
			local year, month, day = parse_date(date)&lt;br /&gt;
			return expand_template(TEMPLATES.death_date, {year, month, day, [format] = &amp;#039;yes&amp;#039;}) .. extra&lt;br /&gt;
		else&lt;br /&gt;
			if is_year_only(birth_date) then&lt;br /&gt;
				location =  mw.ustring.find(birth_date, &amp;#039;%d%d%d%d&amp;#039;)&lt;br /&gt;
				local bd = mw.ustring.sub(birth_date, 1,location+3)&lt;br /&gt;
				if is_month_year_only(death_date) then&lt;br /&gt;
					return expand_template(TEMPLATES.death_date_and_age, {date, bd}) .. extra&lt;br /&gt;
				end&lt;br /&gt;
&lt;br /&gt;
				return expand_template(TEMPLATES.death_date_and_age, {date, bd, [format] = &amp;#039;yes&amp;#039;}) .. extra&lt;br /&gt;
			elseif is_valid_date(birth_date) or is_month_year_only(birth_date) then&lt;br /&gt;
				location =  mw.ustring.find(birth_date, &amp;#039;%d%d%d%d&amp;#039;)&lt;br /&gt;
				local bd = mw.ustring.sub(birth_date, 1,location+3)&lt;br /&gt;
&lt;br /&gt;
				if (is_month_year_only(death_date)) then&lt;br /&gt;
					return expand_template(TEMPLATES.death_date_and_age, {date, bd}) .. extra&lt;br /&gt;
				end&lt;br /&gt;
&lt;br /&gt;
				return expand_template(TEMPLATES.death_date_and_age, {date, bd, [format] = &amp;#039;yes&amp;#039;}) .. extra&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if is_year_only(death_date) then&lt;br /&gt;
		if birth_date == &amp;#039;&amp;#039; then&lt;br /&gt;
			return  expand_template(TEMPLATES.death_year, {mw.ustring.sub(death_date, 1, 5)}) .. mw.ustring.sub(death_date, 5) .. tracking_category&lt;br /&gt;
		else&lt;br /&gt;
			if is_year_only(birth_date) then&lt;br /&gt;
				return  expand_template(TEMPLATES.death_year_and_age, {mw.ustring.sub(death_date, 1, 5), mw.ustring.sub(birth_date, 1, 5)}) .. mw.ustring.sub(death_date, 5) .. tracking_category&lt;br /&gt;
			else&lt;br /&gt;
				if is_valid_date(birth_date) then&lt;br /&gt;
					local location = mw.ustring.find(death_date, &amp;#039;%d%d%d%d&amp;#039;)&lt;br /&gt;
					local date = mw.ustring.sub(death_date, 1,location+3)&lt;br /&gt;
					local extra = mw.ustring.sub(death_date, location+4) .. tracking_category&lt;br /&gt;
&lt;br /&gt;
					location =  mw.ustring.find(birth_date, &amp;#039;%d%d%d%d&amp;#039;)&lt;br /&gt;
					local bd = mw.ustring.sub(birth_date, 1,location+3)&lt;br /&gt;
&lt;br /&gt;
					return  expand_template(TEMPLATES.death_date_and_age, {date, bd}) .. extra&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return original&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.birth(frame)&lt;br /&gt;
	return parse_birth(getArgs(frame, {parentFirst = true}))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.death(frame)&lt;br /&gt;
	return parse_death(getArgs(frame, {parentFirst = true}))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>wikipedia&gt;Zackmann08</name></author>
	</entry>
</feed>