Module:Sandbox/Elli/SignatureDateConvert

From English Wikipedia @ Freddythechick

This is the current revision of this page, as edited by imported>Plastikspork at 15:54, 14 January 2024 (Plastikspork moved page Module:SignatureDateConvert to Module:Sandbox/Elli/SignatureDateConvert without leaving a redirect: Per TfD outcome). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

local p = {}

function p.sigConv(frame)
	s = frame.args.timestamp
	
	r="(%d+):(%d+), (%d+) (%a+) (%d+) %(UTC%)"
	
	hour,min,day,month,year=s:match(r)
	MON={January="01",February="02",March="03",April="04",May="05",June="06",July="07",August="08",September="09",October="10",November="11",December="12"}
	month=MON[month]
	return year .. "-" .. month .. "-" .. day
end

return p