Module:Sandbox/RexxS/Get

local p= {}

function p.getdate(frame) local valtbl = mw.wikibase.getBestStatements("Q42", "P569") return valtbl[1].mainsnak.datavalue.value.time end

function p.getfulldate(frame) local mn = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" } local ts = "1952-03-11" local y, m, d = ts:match("(%d+)-(%d+)-(%d+)") return y .. "/" .. mn[tonumber(m)] .. "/" .. d end

function p.getitem(frame) local valtbl = mw.wikibase.getBestStatements("Q42", "P1196") return valtbl[1].mainsnak.datavalue.value.id end

return p