Is Date weekend/holiday
What it does
Tests wether a date is a weekend date and/or a holiday (based on those that are input via the designer).
Available from version 11968.
First setup
Just make sure that you maintain the list of holidays (in the designer).
How to invoke
Make an http request to
main?command=com.tsnocode.codeunit.frontend.TestDate&Date=[DATE]
This will return a json object.
{
"date": "2026-05-14",
"isHoliday": true,
"isWeekend": false,
"error": false,
"holidayName": "Kristihimmelfart"
}
If error is true, then a message (msg) will also be available.
If isHoliday is true, then a holidayName should also be returned. (As of version 12007)
Developer info
- Type: [Type+link]
- Security: [eg. requires admin or session]
- Classpath: [full class path]