<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.wikianimal.org/index.php?action=history&amp;feed=atom&amp;title=Module%3APerson_height</id>
	<title>Module:Person height - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.wikianimal.org/index.php?action=history&amp;feed=atom&amp;title=Module%3APerson_height"/>
	<link rel="alternate" type="text/html" href="https://www.wikianimal.org/index.php?title=Module:Person_height&amp;action=history"/>
	<updated>2026-04-10T16:40:51Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://www.wikianimal.org/index.php?title=Module:Person_height&amp;diff=2042&amp;oldid=prev</id>
		<title>Animal: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://www.wikianimal.org/index.php?title=Module:Person_height&amp;diff=2042&amp;oldid=prev"/>
		<updated>2023-05-08T10:19:37Z</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&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 10:19, 8 May 2023&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key nadgjlux_wani8320:diff::1.12:old-2041:rev-2042 --&gt;
&lt;/table&gt;</summary>
		<author><name>Animal</name></author>
	</entry>
	<entry>
		<id>https://www.wikianimal.org/index.php?title=Module:Person_height&amp;diff=2041&amp;oldid=prev</id>
		<title>Wikipedia&gt;Zyxw: remove one line from prior edit that was not needed, tested with /sandbox and test cases</title>
		<link rel="alternate" type="text/html" href="https://www.wikianimal.org/index.php?title=Module:Person_height&amp;diff=2041&amp;oldid=prev"/>
		<updated>2020-05-26T15:04:19Z</updated>

		<summary type="html">&lt;p&gt;remove one line from prior edit that was not needed, tested with /sandbox and test cases&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module implements [[Template:Infobox person/height]]&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local function clean(s)&lt;br /&gt;
&lt;br /&gt;
	s = mw.ustring.gsub(s, &amp;#039;metre&amp;#039;, &amp;#039;m&amp;#039;)&lt;br /&gt;
	s = mw.ustring.gsub(s, &amp;#039;([^a])meter&amp;#039;, &amp;#039;%1m&amp;#039;) -- prevents &amp;quot;parameter&amp;quot; from being changed to &amp;quot;param&amp;quot;&lt;br /&gt;
	s = mw.ustring.gsub(s, &amp;#039;centi&amp;#039;, &amp;#039;c&amp;#039;) -- changes &amp;quot;centim&amp;quot; to &amp;quot;cm&amp;quot;&lt;br /&gt;
	s = mw.ustring.gsub(s, &amp;#039;ms&amp;#039;, &amp;#039;m&amp;#039;)&lt;br /&gt;
 	s = mw.ustring.gsub(s, &amp;#039;m[%.,]&amp;#039;, &amp;#039;m&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
	s = mw.ustring.gsub(s, &amp;#039;feet&amp;#039;, &amp;#039;ft&amp;#039;)&lt;br /&gt;
	s = mw.ustring.gsub(s, &amp;#039;foot&amp;#039;, &amp;#039;ft&amp;#039;)&lt;br /&gt;
	s = mw.ustring.gsub(s, &amp;#039;ft[%.,]&amp;#039;, &amp;#039;ft&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
	s = mw.ustring.gsub(s, &amp;#039;inches&amp;#039;, &amp;#039;in&amp;#039;)&lt;br /&gt;
	s = mw.ustring.gsub(s, &amp;#039;inch&amp;#039;, &amp;#039;in&amp;#039;)&lt;br /&gt;
	s = mw.ustring.gsub(s, &amp;#039;ins&amp;#039;, &amp;#039;in&amp;#039;)&lt;br /&gt;
	s = mw.ustring.gsub(s, &amp;#039;in[%.,]&amp;#039;, &amp;#039;in&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
	s = mw.ustring.gsub(s, &amp;#039;%[%[[Mm]%]%]s&amp;#039;, &amp;#039;[[Metre|m]]&amp;#039;)&lt;br /&gt;
	s = mw.ustring.gsub(s, &amp;#039;%[%[[Cc]m%]%]s&amp;#039;, &amp;#039;[[Centimetre|cm]]&amp;#039;)&lt;br /&gt;
	s = mw.ustring.gsub(s, &amp;#039;%[%[[Cc]entim|cm%]%]&amp;#039;, &amp;#039;[[Centimetre|cm]]&amp;#039;)&lt;br /&gt;
	s = mw.ustring.gsub(s, &amp;#039;%[%[[Ii]n|in%]%]&amp;#039;, &amp;#039;[[inch|in]]&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
	return s&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function isnumber(s)&lt;br /&gt;
	if s then&lt;br /&gt;
		s = mw.ustring.gsub(s, &amp;#039;%+%s*%d+%s*/%s*%d+%s*$&amp;#039;, &amp;#039;&amp;#039;)&lt;br /&gt;
		return tonumber(s)&lt;br /&gt;
	end&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function get_convert_args(s, prefer, enforce)&lt;br /&gt;
	local prefer_m = (prefer or &amp;#039;&amp;#039;) == &amp;#039;m&amp;#039;&lt;br /&gt;
	local force_m = (enforce or &amp;#039;&amp;#039;) == &amp;#039;m&amp;#039;&lt;br /&gt;
	local prefer_cm = (prefer or &amp;#039;&amp;#039;) == &amp;#039;cm&amp;#039;&lt;br /&gt;
	local force_cm = (enforce or &amp;#039;&amp;#039;) == &amp;#039;cm&amp;#039;&lt;br /&gt;
	&lt;br /&gt;
	unconverted = clean(s or &amp;#039;&amp;#039;) -- basic unit cleaning&lt;br /&gt;
	&lt;br /&gt;
	s = mw.ustring.gsub(unconverted, &amp;#039;&amp;amp;[Nn][Bb][Ss][Pp];&amp;#039;, &amp;#039; &amp;#039;)&lt;br /&gt;
	&lt;br /&gt;
	local m = mw.ustring.find(s, &amp;#039;m&amp;#039;)&lt;br /&gt;
	local c = mw.ustring.find(s, &amp;#039;cm&amp;#039;)&lt;br /&gt;
	local f = mw.ustring.find(s, &amp;#039;ft&amp;#039;)&lt;br /&gt;
	local i = mw.ustring.find(s, &amp;#039;in&amp;#039;)&lt;br /&gt;
	&lt;br /&gt;
	if m == nil and f == nil and i == nil then&lt;br /&gt;
		return &amp;#039;&amp;#039;, unconverted&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if c ~= nil and f == nil and i == nil then&lt;br /&gt;
		local n = mw.ustring.sub(s, 1, c - 1)&lt;br /&gt;
		if isnumber(n) then&lt;br /&gt;
			return force_m&lt;br /&gt;
				and {n/100,&amp;#039;m&amp;#039;,&amp;#039;ftin&amp;#039;,0,[&amp;#039;abbr&amp;#039;]=&amp;#039;on&amp;#039;}&lt;br /&gt;
				or {n,&amp;#039;cm&amp;#039;,&amp;#039;ftin&amp;#039;,0,[&amp;#039;abbr&amp;#039;]=&amp;#039;on&amp;#039;}, mw.ustring.sub(s, c+2)&lt;br /&gt;
		end&lt;br /&gt;
		return &amp;#039;&amp;#039;, unconverted&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if m ~= nil and c == nil and f == nil and i == nil then&lt;br /&gt;
		local n = mw.ustring.sub(s, 1, m - 1)&lt;br /&gt;
		if isnumber(n) then&lt;br /&gt;
			return force_cm &lt;br /&gt;
				and {n*100,&amp;#039;cm&amp;#039;,&amp;#039;ftin&amp;#039;,0,[&amp;#039;abbr&amp;#039;]=&amp;#039;on&amp;#039;}&lt;br /&gt;
				or {n,&amp;#039;m&amp;#039;,&amp;#039;ftin&amp;#039;,0,[&amp;#039;abbr&amp;#039;]=&amp;#039;on&amp;#039;}, mw.ustring.sub(s, m+1)&lt;br /&gt;
		end&lt;br /&gt;
		return &amp;#039;&amp;#039;, unconverted&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if f ~= nil and i ~=nil and m == nil then&lt;br /&gt;
		local n1 = mw.ustring.sub(s, 1, f - 1)&lt;br /&gt;
		local n2 = mw.ustring.sub(s, f+2, i - 1)&lt;br /&gt;
		if isnumber(n1) and isnumber(n2) then&lt;br /&gt;
			return (force_m or prefer_m)&lt;br /&gt;
				and {n1,&amp;#039;ft&amp;#039;,n2,&amp;#039;in&amp;#039;, &amp;#039;m&amp;#039;,2,[&amp;#039;abbr&amp;#039;]=&amp;#039;on&amp;#039;}&lt;br /&gt;
				or {n1,&amp;#039;ft&amp;#039;,n2,&amp;#039;in&amp;#039;, &amp;#039;cm&amp;#039;,0,[&amp;#039;abbr&amp;#039;]=&amp;#039;on&amp;#039;}, mw.ustring.sub(s, i+2)&lt;br /&gt;
		end&lt;br /&gt;
		return &amp;#039;&amp;#039;, unconverted&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if f ~= nil and i == nil and m == nil then&lt;br /&gt;
		local n = mw.ustring.sub(s, 1, f - 1)&lt;br /&gt;
		if isnumber(n) then&lt;br /&gt;
			return (force_m or prefer_m)&lt;br /&gt;
				and {n,&amp;#039;ft&amp;#039;,&amp;#039;m&amp;#039;,2,[&amp;#039;abbr&amp;#039;]=&amp;#039;on&amp;#039;}&lt;br /&gt;
				or {n,&amp;#039;ft&amp;#039;,&amp;#039;cm&amp;#039;,0,[&amp;#039;abbr&amp;#039;]=&amp;#039;on&amp;#039;}, mw.ustring.sub(s, f+2)&lt;br /&gt;
		end&lt;br /&gt;
		return &amp;#039;&amp;#039;, unconverted&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if i ~= nil and f == nil and m == nil then&lt;br /&gt;
		local n = mw.ustring.sub(s, 1, i - 1)&lt;br /&gt;
		if isnumber(n) then&lt;br /&gt;
			return (force_m or prefer_m)&lt;br /&gt;
				and {n,&amp;#039;in&amp;#039;,&amp;#039;m&amp;#039;,2,[&amp;#039;abbr&amp;#039;]=&amp;#039;on&amp;#039;}&lt;br /&gt;
				or {n,&amp;#039;in&amp;#039;,&amp;#039;cm&amp;#039;,0,[&amp;#039;abbr&amp;#039;]=&amp;#039;on&amp;#039;}, mw.ustring.sub(s, i+2)&lt;br /&gt;
		end&lt;br /&gt;
		return &amp;#039;&amp;#039;, unconverted&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return &amp;#039;&amp;#039;, unconverted&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function convert(frame, args)&lt;br /&gt;
	local targs, str = get_convert_args(args[1], args[&amp;#039;prefer&amp;#039;] or &amp;#039;&amp;#039;, args[&amp;#039;enforce&amp;#039;] or &amp;#039;&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
	if type(targs) == &amp;#039;table&amp;#039; then&lt;br /&gt;
		return frame:expandTemplate{ title = &amp;#039;convert&amp;#039;, args = targs} .. str&lt;br /&gt;
	else&lt;br /&gt;
		return str&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	return convert(frame, frame.args[1] and frame.args or frame:getParent().args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Wikipedia&gt;Zyxw</name></author>
	</entry>
</feed>