본문으로 이동

모듈:PD-posthumous

위키문헌, 우리 모두의 도서관.
모듈 설명문서[보기] [편집] [역사] [새로 고침]

{{PD-posthumous}}를 생성합니다.

--[=[
Implements [[Template:PD-posthumous]]
]=]

require('strict')

local p = {} --p stands for package

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

function p._PD_posthumous(args)
	local pubyear = PD.getPublicationYear({args[1], args['공표연도'], args.pubyear})
	
	local text
	local image
	if pubyear then
		text = PD.license_scope() .. " '''사후 작품'''으로, [[w:저작권 보호 기간|사후 작품의 저작권 보호 기간]]이 사후 공표된 날짜로부터 " .. PD.currentyear - pubyear - 1 .. "년 이하인 일부 국가와 지역에서는 '''[[위키문헌:퍼블릭 도메인|퍼블릭 도메인]]'''입니다."
		image = PD.PD_image
	else
		text = PD.license_scope() .. " '''사후 작품'''으로, 일부 국가와 지역에서는 사후 공표된 날짜에 따라 [[w:저작권 보호 기간|사후 작품의 저작권 보호 기간]]이 결정될 수 있습니다."
		image = "PDmaybe-icon.svg"
	end
	
	return PD.license({
		['image'] = image,
		['image_r'] = 'Flag of the United States in red circle with slash.svg',
		['text'] = text,
		['category'] = args['분류'] or args.category or "PD-posthumous",
		['warning'] = "반드시 미국에서의 저작권 상태를 나타내는 틀과 함께 사용해야 합니다."
	})
end

function p.PD_posthumous(frame)
	return p._PD_posthumous(getArgs(frame))
end

return p