Module:Calendar date/sandbox: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 217:
end
 
-- read dates from localfile -- it assumes dates in the json are in chrono order, needsneed a more flexible method
elseif cfg.datatype == "localfile" then
local numRecords = tableLength(eventdata) -- Get first and last date of holiday
Line 300:
local args = pframe.args
 
local tname = "Calendar date" -- name of calling template. Change if template rename.
local holiday = nil -- name of holiday
local date = nil -- date of holiday (year)
local df = nil -- date format (mdy, dmy, iso - default: iso)
local format = nil -- template display format options
local cite = nil -- leave a citation at end
local calcdate = ""
 
track = {} -- global tracking-category table
 
--- Determine holiday
holiday = trimArg(args.holiday) -- required
if not holiday then
holiday = trimArg(args.event) -- event alias
if not holiday then
return inlineError("holiday", "Missing holiday argument", tname) .. createTracking()
Line 320:
 
--- Determine date
date = trimArg(args.year) -- required
if not date then
return inlineError("year", "Missing year argument", tname) .. createTracking()