Jump to content

Module:Marriage

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Pedantical (talk | contribs) at 19:54, 8 January 2024. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

--
--
--    ! This module is currently Pre-Alpha and not ready for testing.
--
--


-- This module provides consistent formatting for common information included in
-- the spouse parameter of an Infobox_person.
-- It is intended to be used by Template:Marriage and not invoked directly within pages.

local getArgs = require('Module:Arguments').getArgs

local p = {}

function p.main(frame)
	local args = getArgs(frame)
	return args
end

function p._main(args)
	    
	local spouse_name = args[1] or ''
	local date_start = args[2] or ''
	local date_end = args[3] or ''
	local end_reason = args["end"] or args["reason"] or ''

	return spouse_name,' (married ',date_start,', ',end_reason,' ',date_end,')'
end

return p