local Start = "October, 29"
local End = "October, 31"
--[[
CheckBetweenDates()
Below it checks if it's "October, 29", "October, 30" or "October, 31".
And returns true or false depending on the case.
]]
print(CheckBetweenDates) -- true or false
local function IsBetweenDates(checkDate, startDate, endDate)
if(checkDate.UnixTimestamp > startDate.UnixTimestamp and checkDate.UnixTimestamp < endDate.UnixTimestamp)then
return true
end
return false
end
local Start = DateTime.fromLocalTime(2021, 10, 29)
local End = DateTime.fromLocalTime(2021, 10, 31)
local Check1 = DateTime.fromLocalTime(2021, 10, 30)
local Check2 = DateTime.fromLocalTime(2021, 10, 28)
IsBetweenDates(Check1, Start, End)--True
IsBetweenDates(Check2, Start, End)--False