20.08.2020, 06:46
You need to use modulo (%) operator for this:
Code:
data = {}
today = os.date('%w')
for i = 1, 14 do
data[ i ] = (today - i) % 7
end
log(data)