<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fa">
	<id>https://wiki.nebeshtar.com/index.php?action=history&amp;feed=atom&amp;title=%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86%3APerson_length</id>
	<title>پودمان:Person length - تاریخچهٔ نسخه‌ها</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.nebeshtar.com/index.php?action=history&amp;feed=atom&amp;title=%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86%3APerson_length"/>
	<link rel="alternate" type="text/html" href="https://wiki.nebeshtar.com/index.php?title=%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86:Person_length&amp;action=history"/>
	<updated>2026-05-05T07:25:25Z</updated>
	<subtitle>تاریخچهٔ نسخه‌ها برای این صفحه در ویکی</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wiki.nebeshtar.com/index.php?title=%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86:Person_length&amp;diff=382&amp;oldid=prev</id>
		<title>محمد: صفحه‌ای تازه حاوی «-- This module implements الگو:Infobox person/length  local p = {}  local function clean_length(s) 	s = mw.ustring.gsub(s, &#039;centimetre&#039;, &#039;cm&#039;) 	s = mw.ustring.gsub(s, &#039;centimeter&#039;, &#039;cm&#039;) 	s = mw.ustring.gsub(s, &#039;cms&#039;, &#039;cm&#039;) 	s = mw.ustring.gsub(s, &#039;cm%.&#039;, &#039;cm&#039;) 	s = mw.ustring.gsub(s, &#039;metre&#039;, &#039;m&#039;) 	s = mw.ustring.gsub(s, &#039;meter&#039;, &#039;m&#039;) 	s = mw.ustring.gsub(s, &#039;ms&#039;, &#039;m&#039;) 	s = mw.ustring.gsub(s, &#039;m%.&#039;, &#039;m&#039;) 	s = mw.ustring.gsub(s...» ایجاد کرد</title>
		<link rel="alternate" type="text/html" href="https://wiki.nebeshtar.com/index.php?title=%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86:Person_length&amp;diff=382&amp;oldid=prev"/>
		<updated>2025-01-22T21:05:41Z</updated>

		<summary type="html">&lt;p&gt;صفحه‌ای تازه حاوی «-- This module implements &lt;a href=&quot;/wiki/%D8%A7%D9%84%DA%AF%D9%88:Infobox_person/length&quot; title=&quot;الگو:Infobox person/length&quot;&gt;الگو:Infobox person/length&lt;/a&gt;  local p = {}  local function clean_length(s) 	s = mw.ustring.gsub(s, &amp;#039;centimetre&amp;#039;, &amp;#039;cm&amp;#039;) 	s = mw.ustring.gsub(s, &amp;#039;centimeter&amp;#039;, &amp;#039;cm&amp;#039;) 	s = mw.ustring.gsub(s, &amp;#039;cms&amp;#039;, &amp;#039;cm&amp;#039;) 	s = mw.ustring.gsub(s, &amp;#039;cm%.&amp;#039;, &amp;#039;cm&amp;#039;) 	s = mw.ustring.gsub(s, &amp;#039;metre&amp;#039;, &amp;#039;m&amp;#039;) 	s = mw.ustring.gsub(s, &amp;#039;meter&amp;#039;, &amp;#039;m&amp;#039;) 	s = mw.ustring.gsub(s, &amp;#039;ms&amp;#039;, &amp;#039;m&amp;#039;) 	s = mw.ustring.gsub(s, &amp;#039;m%.&amp;#039;, &amp;#039;m&amp;#039;) 	s = mw.ustring.gsub(s...» ایجاد کرد&lt;/p&gt;
&lt;p&gt;&lt;b&gt;صفحهٔ تازه&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module implements [[الگو:Infobox person/length]]&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local function clean_length(s)&lt;br /&gt;
	s = mw.ustring.gsub(s, &amp;#039;centimetre&amp;#039;, &amp;#039;cm&amp;#039;)&lt;br /&gt;
	s = mw.ustring.gsub(s, &amp;#039;centimeter&amp;#039;, &amp;#039;cm&amp;#039;)&lt;br /&gt;
	s = mw.ustring.gsub(s, &amp;#039;cms&amp;#039;, &amp;#039;cm&amp;#039;)&lt;br /&gt;
	s = mw.ustring.gsub(s, &amp;#039;cm%.&amp;#039;, &amp;#039;cm&amp;#039;)&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;meter&amp;#039;, &amp;#039;m&amp;#039;)&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;
	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;
	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;%[%[cm%]%]s&amp;#039;, &amp;#039;[[Centimetre|cm]]&amp;#039;)&lt;br /&gt;
	s = mw.ustring.gsub(s, &amp;#039;%[%[m%]%]s&amp;#039;, &amp;#039;[[Metre|m]]&amp;#039;)&lt;br /&gt;
	s = mw.ustring.gsub(s, &amp;#039;%[%[in|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_length_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_length(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 i = mw.ustring.find(s, &amp;#039;in&amp;#039;)&lt;br /&gt;
	&lt;br /&gt;
	if m == 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 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;in&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;in&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 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;in&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;in&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 i ~= 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_length(frame, args)&lt;br /&gt;
	local targs, str = get_convert_length_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.length(frame)&lt;br /&gt;
	return convert_length(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>محمد</name></author>
	</entry>
</feed>