Module:Sandbox/Dat Hack3r: Difference between revisions
Jump to navigation
Jump to search
Dat Hack3r (talk | contribs) (This is a sandbox, who cares about the edit summary?) |
Dat Hack3r (talk | contribs) No edit summary |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
function p.lastReleaseNumber(frame) | |||
function p. | |||
-- Define the start date of Week 1 | -- Define the start date of Week 1 | ||
local week1Start = os.time{year=2024, month=9, day=8} | local week1Start = os.time{year=2024, month=9, day=8} | ||
-- | -- Get current date | ||
local | local currentDate = os.time() | ||
-- Calculate the difference in days from the start of Week 1 | -- Calculate the difference in days from the start of Week 1 to the current date | ||
local daysDifference = os.difftime( | local daysDifference = os.difftime(currentDate, week1Start) / (24 * 60 * 60) | ||
-- | -- Return the last Weekly Briefing Release | ||
return "[[Weekly Briefing Release "..(math.floor(daysDifference / 7)).."|Weekly Site Information]]" | |||
end | end | ||
return p | return p |
Latest revision as of 12:58, 13 November 2024
Documentation for this module may be created at Module:Sandbox/Dat Hack3r/doc
local p = {}
function p.lastReleaseNumber(frame)
-- Define the start date of Week 1
local week1Start = os.time{year=2024, month=9, day=8}
-- Get current date
local currentDate = os.time()
-- Calculate the difference in days from the start of Week 1 to the current date
local daysDifference = os.difftime(currentDate, week1Start) / (24 * 60 * 60)
-- Return the last Weekly Briefing Release
return "[[Weekly Briefing Release "..(math.floor(daysDifference / 7)).."|Weekly Site Information]]"
end
return p