How to get the amount of time ago the last Monday was?

How to get the amount of time ago the last Monday was?

function getSecondsSinceLastMonday()
	local currentWeekday = tonumber(os.date("%w"))
	local secondsPassed = (currentWeekday + 6) % 7 * 86400 + os.time() % 86400
	return secondsPassed
end

warn(getSecondsSinceLastMonday())
local daynumber=os.date("*t").wday
local days_from_monday=(daynumber-2)

print("Monday Was "..days_from_monday.." Days Ago.")
local timeMonday = DateTime.fromLocalTime( YOUR DATE HERE ) -- order: year, month, day, hour, minute, second (you can leave them 0 too)
-- this gives back the time since EPOCH to the gives date in milliseconds

local timeNow = tick() -- this gives back the time since EPOCH to right now in milliseconds

local timeBetween = timeNow() - (timeMonday/1000)
--this tells you how many seconds passed since the given date