Adopt holidays
rillsoft_calendar_source_importAdopts holidays from a source calendar into a pool calendar, replacing each year the source covers while leaving years with no source data unchanged.
Instructions
Adopts the holidays of a source calendar into a pool calendar. What gets replaced is a whole year at a time: a year the source carries days for is overwritten completely, company holidays entered by hand in that year included, while a year without source data stays untouched. The only guard against that is 'years'. The answer names the days removed and the days created per year. Inside an open unit of work only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| years | No | the years to adopt, either an array such as [2026, 2027] or an object { from, to }; it defaults to every year the source carries | |
| source | No | https URL or absolute path of a holiday source (.xml); it defaults to the source of the program language | |
| sourceCalendar | Yes | name (preferred) or id of a calendar of the source; rillsoft_calendar_source_get reports them | |
| targetCalendar | Yes | { id } or { code } or { name } of the pool calendar to fill |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | id of the calendar | |
| code | No | code of the calendar; missing when none is set | |
| name | No | name of the calendar | |
| years | Yes | balance per year | |
| source | Yes | evaluated source, URL or file path | |
| created | Yes | days created in total | |
| outcome | Yes | what the call did | |
| sourceCalendar | Yes | name of the adopted source calendar |