คุยเรื่องแม่แบบ:หรก/ว

ไม่รองรับเนื้อหาของหน้าในภาษาอื่น
จาก วิกิซอร์ซ

Lua code to generate pattern for month name,

local m={}; for i=1,12 do m[i]=mw.language.getContentLanguage():formatDate('F', '2021-'..i..'-01') end
local s={}; for j=1,6 do s[j]=''; for i=1,12 do local c=mw.ustring.sub(m[i],j,j); s[j]=s[j]..c end end
local j=7; s[j]=''; for i=1,12 do local c=mw.ustring.sub(m[i],j); s[j]=s[j]..c end
local r = ''; for j=1,7 do local ss={} for c in mw.text.gsplit(s[j], '', true) do if mw.ustring.len(c)>0 and not ss[c] then table.insert(ss,c); ss[c]=true end end r=r..'['..table.concat(ss)..']'; mw.log(j, #ss, r) end

--Ans (คุย) 05:34, 1 ตุลาคม 2564 (+07)[ตอบกลับ]