Module:PD-US-no-renewal-unvested

--[=[
Implements [[Template:PD-old-collective]]
]=]

local p = {} --p stands for package

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

function p._PD_US_no_renewal_unvested(args)
	local deathyear = PD.getAuthorDeathYear({args[1], args.deathyear})
	local pubyear = PD.getPublicationYear({args[2], args.pubyear})
	local film = args.film
	local category = args.category
	
	if pubyear and pubyear < PD.PD_US_cutoff then
		return require('Module:PD-US')._PD_US({['deathyear'] = deathyear, ['category'] = category, ['film'] = film})
	end
	
	local text = PD.license_scope({past = true}) .. " ''[[United States Code/Title 17/Chapter 1/Section 101#publication|legally published]]'' within the United States (or the United Nations Headquarters in New York subject to Section 7 of the [[United States Headquarters Agreement]]) before 1964, and the copyright of " .. PD.license_scope({lc = true, past = true}) .. " assigned by the author to another party. That assignee renewed the copyright at the appropriate time, in the assignee's own name, after the death of the author. However, " .. PD.license_grammar({"this work is", "these works are"}) .. " in the '''[[w:public domain|public domain]]''' in the United States because the renewal " .. PD.license_grammar({"copyright was", "copyrights were"}) .. " never vested in the assignees who made the copyright renewal application. The author must be alive at the start of the copyright renewal term for the author's prior assignments to vest. If, however, the author dies before vesting of the renewal copyright, the party to whom the renewal-copyright interest was conveyed loses the entitlement to that interest. Therefore, the copyright of " .. PD.license_grammar({"this work is", "these works are"}) .. " not valid." .. PD.shorter_term_text(deathyear, film)
	
	return PD.license({
		['image'] = PD.PD_image,
		['image_r'] = PD.US_flag_image,
		['text'] = text,
		['category'] = category or "PD-US-no-renewal-unvested"
	})
end

function p.PD_US_no_renewal_unvested(frame)
	return p._PD_US_no_renewal_unvested(getArgs(frame))
end

return p