Module:PD-US-no-renewal

require('strict')

--[=[ Implements Template:PD-US-no-renewal ]=]

local p = {} --p stands for package

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

function p._PD_US_no_renewal(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 local template = "PD-US-no-renewal"

-- Should we use PD-US? if 1963 < PD.PD_US_cutoff or (pubyear and pubyear < PD.PD_US_cutoff) then return require('Module:PD-US')._PD_US({['deathyear'] = deathyear, ['category'] = category}) end -- Is this work after the cutoff date? if pubyear and pubyear > 1963 then return PD.error_text(template .. " does not apply to works published after 1963.", template) end -- Text local text = PD.license_scope .. " in the public domain in the United States because " .. PD.license_grammar({"it was", "they were"}) .. " 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 copyright was not renewed.\n\n" text = text .. table.concat({		'* For Class A renewals records (\'\'\'books\'\'\' only) published between 1923 and 1963, check the Stanford University Copyright Renewal Database.',		'* For other renewal records of publications between 1922–1950 see the University of Pennsylvania copyright records scans.',		'* For all records since 1978, search the U.S. Copyright Office records.'	}, '\n') if pubyear then text = text .. "\n\nWorks published in " .. pubyear .. " would have had to renew their copyright in either " .. pubyear + 27 .. " or " .. pubyear + 28 .. ", i.e. at least 27 years after they were first published/registered but not later than 31 December in the 28th year. As this work's copyright was not renewed, it entered the public domain on 1 January " .. pubyear + 29 .. "."	else text = text .. "\n\nWorks had to renew their copyright at least 27 years after they were first published/registered but not later than 31 December in the 28th year." end text = text .. PD.shorter_term_text(deathyear, film) return PD.license({		['image'] = PD.PD_image,		['image_r'] = PD.US_flag_image,		['text'] = text,		['warning'] = "It is imperative that contributors search the renewal databases and ascertain that there is no evidence of a copyright renewal before using this license. Failure to do so will result in the deletion of the work as a copyright violation.",		['category'] = category or PD.category_with_deathyear_floor(template, deathyear),	}) end

function p.PD_US_no_renewal(frame) return p._PD_US_no_renewal(getArgs(frame)) end

return p