Module:SetDateRange: Difference between revisions
From Seven Sages of Rome
(Created page with "local p = {}; p.setDateRange = function( f ) local args = f.args local date_range = nil if args.start_date and args.end_date then date_range = args.start_date .. "-" .. args.end_date elseif args.start_date then date_range = args.start_date elseif args.end_date then date_range = args.end_date end return date_range end") |
No edit summary |
||
Line 13: | Line 13: | ||
return date_range | return date_range | ||
end | end | ||
return p |
Revision as of 08:54, 17 June 2024
Documentation for this module may be created at Module:SetDateRange/doc
local p = {};
p.setDateRange = function( f )
local args = f.args
local date_range = nil
if args.start_date and args.end_date then
date_range = args.start_date .. "-" .. args.end_date
elseif args.start_date then
date_range = args.start_date
elseif args.end_date then
date_range = args.end_date
end
return date_range
end
return p