<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://chabadpedia.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AYMD_to_ISO</id>
	<title>Module:YMD to ISO - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://chabadpedia.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AYMD_to_ISO"/>
	<link rel="alternate" type="text/html" href="https://chabadpedia.com/index.php?title=Module:YMD_to_ISO&amp;action=history"/>
	<updated>2026-04-10T13:08:58Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://chabadpedia.com/index.php?title=Module:YMD_to_ISO&amp;diff=11235&amp;oldid=prev</id>
		<title>Abhishek.it: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://chabadpedia.com/index.php?title=Module:YMD_to_ISO&amp;diff=11235&amp;oldid=prev"/>
		<updated>2025-05-24T09:13:09Z</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 05:13, 24 May 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key chabadpedia_en:diff:1.41:old-5724:rev-11235 --&gt;
&lt;/table&gt;</summary>
		<author><name>Abhishek.it</name></author>
	</entry>
	<entry>
		<id>https://chabadpedia.com/index.php?title=Module:YMD_to_ISO&amp;diff=5724&amp;oldid=prev</id>
		<title>Shia.k: Created page with &quot;local p = {}  local function month_number(month_name)     local months_full = {january=1, february=2, march=3, april=4, may=5, june=6, july=7, august=8, september=9, october=10, november=11, december=12}     local months_abbr = {jan=1, feb=2, mar=3, apr=4, may=5, jun=6, jul=7, aug=8, sep=9, sept=9, oct=10, nov=11, dec=12}     local month_lc, _ = string.gsub(string.lower(month_name),&#039;%.&#039;,&#039;&#039;,1)     local month_num = months_full[month_lc] or months_abbr[month_lc] or 0     r...&quot;</title>
		<link rel="alternate" type="text/html" href="https://chabadpedia.com/index.php?title=Module:YMD_to_ISO&amp;diff=5724&amp;oldid=prev"/>
		<updated>2025-03-20T20:39:11Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local p = {}  local function month_number(month_name)     local months_full = {january=1, february=2, march=3, april=4, may=5, june=6, july=7, august=8, september=9, october=10, november=11, december=12}     local months_abbr = {jan=1, feb=2, mar=3, apr=4, may=5, jun=6, jul=7, aug=8, sep=9, sept=9, oct=10, nov=11, dec=12}     local month_lc, _ = string.gsub(string.lower(month_name),&amp;#039;%.&amp;#039;,&amp;#039;&amp;#039;,1)     local month_num = months_full[month_lc] or months_abbr[month_lc] or 0     r...&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&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:39, 20 March 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key chabadpedia_en:diff:1.41:old-11234:rev-5724 --&gt;
&lt;/table&gt;</summary>
		<author><name>Shia.k</name></author>
	</entry>
	<entry>
		<id>https://chabadpedia.com/index.php?title=Module:YMD_to_ISO&amp;diff=11234&amp;oldid=prev</id>
		<title>wikipedia&gt;Dinoguy1000: simplify month_number (instead of a separate test, `sept` can simply be added as an entry to the months_abbr array)</title>
		<link rel="alternate" type="text/html" href="https://chabadpedia.com/index.php?title=Module:YMD_to_ISO&amp;diff=11234&amp;oldid=prev"/>
		<updated>2022-11-22T10:54:50Z</updated>

		<summary type="html">&lt;p&gt;simplify month_number (instead of a separate test, `sept` can simply be added as an entry to the months_abbr array)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
local function month_number(month_name)&lt;br /&gt;
    local months_full = {january=1, february=2, march=3, april=4, may=5, june=6, july=7, august=8, september=9, october=10, november=11, december=12}&lt;br /&gt;
    local months_abbr = {jan=1, feb=2, mar=3, apr=4, may=5, jun=6, jul=7, aug=8, sep=9, sept=9, oct=10, nov=11, dec=12}&lt;br /&gt;
    local month_lc, _ = string.gsub(string.lower(month_name),&amp;#039;%.&amp;#039;,&amp;#039;&amp;#039;,1)&lt;br /&gt;
    local month_num = months_full[month_lc] or months_abbr[month_lc] or 0&lt;br /&gt;
    return month_num&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function days_in_month(month_num,year)&lt;br /&gt;
    -- modified from code in Module:Citation/CS1/Date_validation&lt;br /&gt;
    local days = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}&lt;br /&gt;
    local month_length&lt;br /&gt;
    if month_num == 2 then         -- February: 28 days, unless leap year&lt;br /&gt;
        month_length = 28&lt;br /&gt;
        if year &amp;lt;= 1582 then       -- Julian calendar before Oct 1582&lt;br /&gt;
            if (year%4) == 0 then&lt;br /&gt;
                month_length = 29  -- if leap year, then 29 days&lt;br /&gt;
            end&lt;br /&gt;
        else                       -- Gregorian calendar since Oct 1582&lt;br /&gt;
            if ( (year%4)==0 and ((year%100)~=0 or (year%400)==0) ) then  &lt;br /&gt;
                month_length = 29  -- if leap year, then 29 days   &lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    else                           -- not February, get number of days for month&lt;br /&gt;
        month_length = days[month_num]&lt;br /&gt;
    end&lt;br /&gt;
    return month_length&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function zero_pad(string)&lt;br /&gt;
    if string.len(string) == 1 then&lt;br /&gt;
        return &amp;#039;0&amp;#039; .. string&lt;br /&gt;
    else&lt;br /&gt;
        return string&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
    if frame.args[1] == nil then&lt;br /&gt;
        return &amp;#039;&amp;#039;     -- first argument is missing&lt;br /&gt;
    end&lt;br /&gt;
    local arg1, _ = string.gsub(mw.text.trim(frame.args[1]),&amp;#039;_&amp;#039;,&amp;#039; &amp;#039;)&lt;br /&gt;
    return p._main(arg1)&lt;br /&gt;
end&lt;br /&gt;
function p._main(arg1)&lt;br /&gt;
    if arg1 == &amp;#039;&amp;#039; then&lt;br /&gt;
        return &amp;#039;&amp;#039;     -- first argument is empty&lt;br /&gt;
    end&lt;br /&gt;
    if not arg1:match(&amp;#039;^%d%d%d%d %a%a%a%a?%.?%a?%a?%a?%a?%a?%a? *%d%d?$&amp;#039;) then&lt;br /&gt;
        return arg1   -- invalid date pattern&lt;br /&gt;
    end&lt;br /&gt;
    local year, month_name, day = string.match(arg1, &amp;#039;^(%d%d%d%d) *(%a%a%a%a?%.?%a?%a?%a?%a?%a?%a?) *(%d%d?)$&amp;#039;)&lt;br /&gt;
    if month_number(month_name) == 0 then&lt;br /&gt;
        return arg1   -- invalid month name or abbreviation&lt;br /&gt;
    end&lt;br /&gt;
    if tonumber(day) &amp;lt; 1 or tonumber(day) &amp;gt; days_in_month(month_number(month_name),tonumber(year)) then&lt;br /&gt;
        return arg1   -- invalid day number for given month&lt;br /&gt;
    end&lt;br /&gt;
    return year .. &amp;#039;-&amp;#039; .. zero_pad(tostring(month_number(month_name))) .. &amp;#039;-&amp;#039; .. zero_pad(day)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>wikipedia&gt;Dinoguy1000</name></author>
	</entry>
</feed>