# Is Date weekend/holiday

## <span class="mw-headline" id="bkmrk-what-it-does-1">What it does</span>

<span class="mw-headline">Tests wether a date is a weekend date and/or a holiday (based on those that are input via the designer).</span>

<span class="mw-headline">Available from version 11968.</span>

## <span class="mw-headline" id="bkmrk-first-setup-1">First setup</span>

<span class="mw-headline">Just make sure that you maintain the list of holidays (in the designer).</span>

## <span class="mw-headline" id="bkmrk-how-to-invoke-1">How to invoke</span>

<span class="mw-headline">Make an http request to  
</span>

```
main?command=com.tsnocode.codeunit.frontend.TestDate&Date=[DATE]
```

<span class="mw-headline">This will return a json object.</span>

```json
{
  "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)

## <span class="mw-headline" id="bkmrk-developer-info-1">Developer info</span>

- <span class="mw-headline">Type: \[Type+link\]</span>
- <span class="mw-headline">Security: \[eg. requires admin or session\]</span>
- <span class="mw-headline">Classpath: \[full class path\]</span>