04.04.2025, 10:29
Code:
webrequest = require('webrequest')
data = {
name = 'new holiday',
type = '', -- '' (specific date) or 'dayweeknr' (day of the week)
day = 1, -- day of the month number
month = 1, -- month number, 1 = Jan, 12 = Dec
year = 0, -- 0 = all years, specific year otherwise
duration = 1, -- duration in days
dayofweek = 1, -- day of the week, 1 = Monday, 7 = Sunday
dayweeknr = 1, -- 1st, 2nd etc day in a month, 6th value = last
}
res, err = webrequest('schedulers', 'holidays-save', { data = data })
log(res, err)