--- title: "Calendar filter" slug: "base-calendar-filter" updated: 2026-04-23T12:03:36Z published: 2026-04-23T12:03:36Z canonical: "docs.lobstersoftware.com/base-calendar-filter" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # Calendar filter > [!NOTE] > **Value resolver – Abstract** > > **Purpose:** Performs a *check for working days* against a specified [Calendar](/v1/docs/en/administration-master-data-calendar) based on a date or date range provided as an *input value*. If the check fails, an alternate date is returned, otherwise the *input value* is returned. > > > [!TIP] > > Tooltip > > > > - **Usage**: For the *input value* to be checked by the [Calendar filter](/v1/docs/en/base-calendar-filter), a "Check for working days" is performed against the parameterized **Calendar**. The *input value* is returned if the check is passed or not possible because no suitable *input value* and/or [Calendar](/v1/docs/en/administration-master-data-calendar) is available at runtime. If the check is executed but not passed, then – depending on the option **Jump backwards** before or after the *input value* – an *alternative* *date* is searched for and returned. As a special use case (see example in the manual), the [Calendar filter](/v1/docs/en/base-calendar-filter) can be considered in a loop that can be used to determine a target date that is a certain number of business days before or after the *input value*. > > - **Parameter**: > > - The **Static** option determines whether the **Calendar** is determined by a static single selection in the configuration or at runtime by a value resolver. > > - The **Calendar** requires a single selection as a required field depending on the **Static** option or the configuration of a value resolver, which should return a [Calendar](/v1/docs/en/administration-master-data-calendar) or its ID as `Long` at runtime. > > - The **Jump backward** option reverses the search direction for *alternative date* compared to the default "Jump forward". > > - **WARNING:** The search for an *alternative date* may continue endlessly if the calendar does not contain any working days in the search direction (forward/backward). This can only happen if a **Calendar** does not specify a weekday as a working day, so that working days can only occur as exceptions of the "Working day" type. References to inappropriately parameterized calendars in a calendar filter value resolver can cause infinite loops that require a restart of the server. ![images/download/attachments/58596494/image2022-8-10_13-26-30-version-1-modificationdate-1660130790728-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-8-10_13-26-30-version-1-modificationdate-1660130790728-api-v2.png) The [Calendar filter](/v1/docs/en/base-calendar-filter) value resolver performs a *check for working days* based on a date or date range provided as *input value* (see below for details) against a [Calendar](/v1/docs/en/administration-master-data-calendar) specified either as **Static** or at runtime by a value resolver. The check is considered passed if the [Calendar](/v1/docs/en/administration-master-data-calendar) classifies the date or the from and to dates of a date range as a working day. Then the *input value* is returned. Otherwise, an *alternative date* for the date or date range is searched for and returned. The **Jump backwards** option decides the search direction (earlier/later) for the *alternative date* if the *input value* does not pass the *check for working days* against the specified [Calendar](/v1/docs/en/administration-master-data-calendar). Special use case: In the context of a [For each loop](/v1/docs/en/core-for-each-entity-actor) event action (see last example below), the [Calendar filter](/v1/docs/en/base-calendar-filter) value resolver can be used to determine, starting from a start date, a date that is a certain number of business days away from the start date. One of the following data types is expected as *input value*: - `Long` ( `java.lang.Long`) - "Date" (`java.lang.Date`) - "Timestamp" (`java.sql.Timestamp`) - "Date with time" (`DateTime`) - "Date range with time" (`DateRange`) > [!NOTE] > **Interpretation of date values without declared time zone** > > A `Long` value as *input value* is interpreted as milliseconds since 01.01.1970 00:00:00.000 (UTC). However, as for all *input* *value* types interpreted as a date without a time zone (`Long`, `Timestamp`, `Date`), the `UTC` time zone is not the default. Rather, the default time zone applicable in the context is considered according to the following logic: > > - If a "Default time zone" (`defaultTimeZone`) is defined for the [User of session](/v1/docs/en/base-session-user-value) (in the actual logged-in session), this will be used. > - Otherwise, the account of the [Company of session](/v1/docs/en/base-session-company-account-value) (in the actual logged-in session) and the "Default time zone" (`defaultTimeZone`) defined there, if applicable, will be used. > - Only if neither account defines a "Default time zone" for the actual logged in session, the selection for the time zone in the operating system of the server or client will be the deciding factor: > - In the server context (e.g. for [Event handling](/v1/docs/en/administration-designer-workflow-action-event-handler-configuration)) the time zone is taken from the **Lobster Data Platform/Orchestration** server execution context. > - In the client context (e.g. in a [Client Workflow](/v1/docs/en/frebehav-client-workflow)), the selection for the time zone is adopted in the client operating system. The type of the return value always corresponds to the type of the *input valu*e. **NOTE:** For the data types summarized as "Date values without declared time zone" this means that the default time zone applicable in the context is taken into account by the checking and calculation logic, but does not explicitly appear in the data of the return value. The time zone used for interpretation can be decisive for which *calendar day* a certain input value is assigned, which formally defines only "UTC milliseconds". However, the return value determined depending on the comparison between the assigned *calendar day* and a [Calendar](/v1/docs/en/administration-master-data-calendar) is then again defined only in "UTC milliseconds". The following case distinction is used to determine the return value: | Suitable type as *input value*? | [Calendar](/v1/docs/en/administration-master-data-calendar) defined? | "Check for working days" (see below) against the [Calendar](/v1/docs/en/administration-master-data-calendar)? | "Jump backwards?" option | Return value | | --- | --- | --- | --- | --- | | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/error(29).svg) Unsuitable (e.g. `XYZ` or `$null`) | *irrelevant* | *irrelevant* | *irrelevant* | *Input value* | | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/check(35).svg) Suitable (Data type from the list above) | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/error(29).svg) Calendar not defined) | | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/check(35).svg) Calendar is defined | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/check(35).svg) Check passed | | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/error(29).svg) Check not passed | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/error(29).svg) "Jump forwards" (default) | *Alternative date*: Least possible shift of the *input value* (date value/range) to later, for which the "Check for working days" is passed. | | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/check(35).svg) "Jump backwards" | *Alternative date*: Least possible shift of the input value (date value/range) to earlier, for which the "Check for working days" is passed. | | **NOTE:** Rules for "Jump forward" or "Jump backward". - "Jumping" is done with an increment of whole calendar days. - Times from the *input value* apply unchanged to the *alternative date*. - If no suitable *alternative date* is found when "jumping" in the desired direction, two cases can be distinguished: - For individual date values this is very unlikely but potentially highly problematic (see CAUTION in the following table). - For a date range, the check simply terminates if necessary and returns the *input value* as a return value. | The following rules apply to the "Check for working days" of the input value against the defined [Calendar](/v1/docs/en/administration-master-data-calendar): | Type of input value | Checking logic | | --- | --- | | `Long` *or "*Date" *or* "Timestamp" *or* "Date with time" | A date value (as opposed to a "Date range", see below) is considered a working day if the *calendar day* determined with respect to the applicable time zone is considered a working day according to the defined [Calendar](/v1/docs/en/administration-master-data-calendar). If necessary, definitions on different levels of the calendar model are taken into account: - Each [Calendar](/v1/docs/en/administration-master-data-calendar) primarily defines which *days of the week* are considered working days by default. - A [Calendar](/v1/docs/en/administration-master-data-calendar) can optionally define exceptions that explicitly qualify a particular calendar day as a "Working day" or "No working day". - Each exception must be related by a "factor" to the whole (factor: 1.0) or a portion (factor<1.0) of the *calendar day* in question. - A [Calendar](/v1/docs/en/administration-master-data-calendar) can also optionally refer to one or more "Holiday groups" (see [Holiday groups](/v1/docs/en/base-holiday-group)). - A "Holiday group" defines exceptions of the "No working day" type, accordingly - Each holiday must be related by a "factor" to the whole *calendar day* (factor: 1.0) or a share (factor<1.0). A *calendar day i*s considered a working day if one of the following conditions is met: - The *day of the week* is considered a working day by default according to the [Calendar](/v1/docs/en/administration-master-data-calendar) and the [Calendar](/v1/docs/en/administration-master-data-calendar) does not specify an exception of the "No working day" type for the *calendar day* with "factor" 1.0 and the [Calendar](/v1/docs/en/administration-master-data-calendar) does not refer to any holiday group that defines a holiday with a "factor" of 1.0 for the *calendar day*, which is not neutralized by an exception of the "Working day" type in the [Calendar](/v1/docs/en/administration-master-data-calendar) (with any "factor", i.e. also 0). - According to the [Calendar](/v1/docs/en/administration-master-data-calendar), the *day of the week* is not considered a working day by default, and the [Calendar](/v1/docs/en/administration-master-data-calendar) does not specify an exception of the "Working day" type (with any "factor", i.e. also 0) that refers to the *calendar day* in question. --- **CAUTION****:** Theoretically, a [Calendar](/v1/docs/en/administration-master-data-calendar) can be configured not to contain working days by default, so that working days are created only by exceptions of the "Working day" type. In conjunction with the [Calendar filter](/v1/docs/en/base-calendar-filter) value resolver, there is then a risk that when "Jump forward" or "Jump backward" is used starting from a *calendar day* that is not specified as a working day, no viable *alternative dates* can be found. **References to improperly parameterized calendars in a calendar filter value resolver can cause infinite loops that require a server restart.** | | "Date range with time" | A "Date range" is considered a working day if the *calendar days* for the "From" and "To" components, determined taking into account the time zone, are considered working days when evaluated against the defined [Calendar](/v1/docs/en/administration-master-data-calendar) according to the check logic described above. **IMPORTANT:** Whether the [Calendar](/v1/docs/en/administration-master-data-calendar) shows working days between the "From" and "To" *calendar days* or not is irrelevant for the check! If the check is not passed for a date range, then the date range as a whole is moved "in parallel", i.e. an *alternative date* is determined while retaining the original time span between the "From" and "To" components. --- **WARNING:** It is possible that a [Calendar](/v1/docs/en/administration-master-data-calendar) in the desired search direction does not contain a pair of working days (for "From" and "To") in the "suitable" interval. For example, if a calendar defines only three adjacent days of the week (say: Monday, Tuesday and Wednesday) as working days, then it is impossible to find a suitable date for a date range with a time span of 3–4 days. The following diagram illustrates the problem in the example: `┌────────── +4 ──────────┐... MON - TUE - WED -(THU)-(FRI) -(SAT)-(SUN)- MON - TUE - WED `- ... `└────── +3 ───────┘`. The [Calendar filter](/v1/docs/en/base-calendar-filter) value resolver then returns the *input valu*e unchanged. | ## Configuration The [Calendar filter](/v1/docs/en/base-calendar-filter) value resolver expects a date value or date range as *input value*, which can be provided by concatenation or as a *reference object*. | The **Static** option (unchecked by default) refers to the configuration for the required **Calendar** parameter. If the option is checked (see image), a dropdown box appears, which supports a static single selection for a [Calendar](/v1/docs/en/administration-master-data-calendar). All calendars for which read access exists in the context of the configuration appear in the dropdown. At runtime, there is always access to the selected calendar. An already selected calendar for which there is no read access in the current configuration session appears with the label "Hidden calendar". As shown in the image, a search function supports the selection of the calendar based on the properties contained in the label (*in the* *example*: Name "24-1 (MON)"). | ![images/download/attachments/58596494/image2022-8-10_13-30-44-version-1-modificationdate-1660131044377-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-8-10_13-30-44-version-1-modificationdate-1660131044377-api-v2.png) | | --- | --- | | If the **Static** option is unchecked, then a value resolver must be configured for the **Calendar** parameter. As return value for the value resolver either a [Calendar](/v1/docs/en/administration-master-data-calendar) object (`Calendar`) is expected (see image below right) or a `Long` value (see image right), which specifies the ID (`id`) of a [Calendar](/v1/docs/en/administration-master-data-calendar) object. In the upper right image, the statically defined `Long` value `451` references the [Calendar](/v1/docs/en/administration-master-data-calendar) "24-1 (MON)" from the example above. In the image on the bottom right, a [Variable](/v1/docs/en/core-storage-value) value resolver is used to read a variable that must return an object of **Type "**Calendar" (`Calendar`) at runtime. This variable could be filled with a [Search (Event action)](/v1/docs/en/core-search-actor), for example. **NOTE:** - The reference via the `Long` value, in contrast to the static selection (above), is not suitable for transferring configurations via [Meta exchange](/v1/docs/en/administration-metaexchange) between systems in which corresponding calendars do not necessarily use the same IDs. Only with a static selection (above) deviating IDs are automatically adjusted during an [Import job](/v1/docs/en/core-import-job). - A [Calendar](/v1/docs/en/administration-master-data-calendar) reference via the `Long` value also does not prevent the [Calendar](/v1/docs/en/administration-master-data-calendar) from being deleted. As long as a static selection (see above) exists, the selected [Calendar](/v1/docs/en/administration-master-data-calendar) cannot be deleted. - If the reference by ID (`Long` value) or another value resolver does not return a [Calendar](/v1/docs/en/administration-master-data-calendar) object at runtime, then the [Calendar filter](/v1/docs/en/base-calendar-filter) returns the input value directly, i.e. unchecked and without triggering an error message or a warning. The fact that the check has failed cannot be established in this case (see table for case distinction above). | ![images/download/attachments/58596494/image2022-8-10_13-31-26-version-1-modificationdate-1660131086509-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-8-10_13-31-26-version-1-modificationdate-1660131086509-api-v2.png) | | ![images/download/attachments/58596494/image2022-8-10_13-32-26-version-1-modificationdate-1660131146506-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-8-10_13-32-26-version-1-modificationdate-1660131146506-api-v2.png) | | The option **Jump backwards** is unchecked by default. Then the calendar (or along a theoretical "time axis") is "jumped forward" if the input value does not pass the "Check for working day" (see above). If the option **Jump backwards** is checked, then the system searches for replacement dates that are earlier than the *input value*, if necessary. - In the example on the right, a [Calendar](/v1/docs/en/administration-master-data-calendar) "24-3 (MON_WED)" is specified that defines only Monday, Tuesday and Wednesday as working days. *Input values* concerning times between Thursday and Sunday are "reverted back" to the previous Wednesday with the configuration shown, while keeping the same time. | ![images/download/attachments/58596494/image2022-8-10_13-33-29-version-1-modificationdate-1660131209240-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-8-10_13-33-29-version-1-modificationdate-1660131209240-api-v2.png) | ## Examples ### Simple date calculation taking into account working days | In the context of an event handling, the estimated time of arrival ("ETA") of a shipment is calculated as the "Date with time". Since the incoming goods are considered to be available immediately (or on the same calendar day) only if they are received on a working day, the calculated "ETA" date is compared with an existing [Calendar](/v1/docs/en/administration-master-data-calendar) to determine a further date ("AVAIL") for the effective availability of the goods at the consignee’s address. The user should be informed about the calendar days for "ETA" and "AVAIL" by a [Show alert (Popup)](/v1/docs/en/core-popup-actor) event action. Runtime example: ![images/download/attachments/58596494/image2022-8-9_15-38-57-version-1-modificationdate-1660052337309-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-8-9_15-38-57-version-1-modificationdate-1660052337309-api-v2.png) - If the shipment arrives on Saturday, 1 October (2022), the delivered goods will be considered available only from Tuesday, 4 October, since the [Calendar](/v1/docs/en/administration-master-data-calendar) used for the check takes into account not only the weekend (Saturday/Sunday) but also a holiday on Monday 3 October. Configuration: For the configuration on the right, the already calculated "ETA" date (as "Date with time") is valid as a *reference* *object* within an [Execute with](/v1/docs/en/core-with-actor) event action (not shown in the image). - The "ETA" date only needs to be labeled and formatted in the **Title** of the mapped [Show alert (Popup)](/v1/docs/en/core-popup-actor) event action in the context of a [Concat strings](/v1/docs/en/core-concat-string-resolver) (see [Format date](/v1/docs/en/core-date-format-resolver)). - The **Message** also uses a [Concat strings](/v1/docs/en/core-concat-string-resolver) to label the date value, which is calculated using the [Calendar filter](/v1/docs/en/base-calendar-filter) value resolver and then formatted using concatenation (see [Format date](/v1/docs/en/core-date-format-resolver)). - The [Calendar filter](/v1/docs/en/base-calendar-filter) value resolver statically accesses a [Calendar](/v1/docs/en/administration-master-data-calendar) "24-5 (MON-FRI)", in which working days are searched for by "Jump forward", if necessary. **NOTE:** The availability date is only displayed here as a calendar day without time components and is not otherwise processed or stored. In this respect, it does not matter that a time contained in the calculated "ETA" date may pass to the "AVAIL" date. The following example deals with this problem. | ![images/download/attachments/58596494/image2022-8-10_13-36-13-version-1-modificationdate-1660131373910-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-8-10_13-36-13-version-1-modificationdate-1660131373910-api-v2.png) | | --- | --- | ### Date calculation with conditional adjustment of the time (only when "jumping forward" to the following working day) | The previous example is now extended so that on the one hand the time calculated in the "ETA" date appears in the message to the exact minute. On the other hand, when "jumping forward" – i.e. when the "ETA" date falls on a calendar day that is not a working day – the time for the availability date ("AVAIL") is statically set to the time 07:30 (on the following working day). If the "ETA" directly matches a working day, the goods are considered "immediately" available. Runtime example: ![images/download/attachments/58596494/image2022-8-9_16-40-49-version-1-modificationdate-1660056049474-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-8-9_16-40-49-version-1-modificationdate-1660056049474-api-v2.png) - When the shipment arrives on the same weekend as in the previous example, the goods are considered available from the following working day (here: Tuesday, 4 October) at 07:30. Configuration: - Before the [Show alert (Popup)](/v1/docs/en/core-popup-actor) event action, a case distinction is inserted per an [If then else](/v1/docs/en/core-if-then-else-actor) event action, which compares in an [Entity property rule](/v1/docs/en/core-entity-property-rule) whether the [Calendar filter](/v1/docs/en/base-calendar-filter) value resolver (settings see above) returns a value deviating from the "ETA" date (*reference object*). The original value In any case, the return value from the [Calendar filter](/v1/docs/en/base-calendar-filter) value resolver is stored in the `avail` variable via the concatenated [Store value as variable](/v1/docs/en/core-store-value-resolver) value resolver. - If the [Calendar filter](/v1/docs/en/base-calendar-filter) returns a return value that differs from its *input value*, then the return value is post-processed in the `avail` variable in the "Then" branch. A [Set value](/v1/docs/en/core-set-value-actor) event action overwrites the "ETA" time in the return value from the [Calendar filter](/v1/docs/en/base-calendar-filter) with the statically specified time (7:30). This is enabled by the [Relative date with time](/v1/docs/en/core-date-time-value) value resolver with the **Type** "Custom" and the following **Custom time**:`7H 30m 0s 0S`. - In the subsequent [Show alert (Popup)](/v1/docs/en/core-popup-actor) event action, only the `avail` variable must be accessed instead of the [Calendar filter](/v1/docs/en/base-calendar-filter) (see above) to define the availability date in the **Message**. | ![images/download/attachments/58596494/image2022-8-10_13-45-5-version-1-modificationdate-1660131905221-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-8-10_13-45-5-version-1-modificationdate-1660131905221-api-v2.png) | | --- | --- | ### Appointment determination against a "dynamically" selected calendar at runtime | In the context of event handling, it is determined up to which date in the current month partial loads can still be ordered via the freight forwarder already selected for the specific order. For this reason, a [Calendar](/v1/docs/en/administration-master-data-calendar) with the uniform name "LTL" has been created for each freight forwarder for the coordination of appointments, which represents recurring and discreetly defined appointment options for the processing of partial loads as "working days". Configuration: The event handling must first determine the calendar matching the selected freight forwarder in the context of the relevant order. This allows a [Search (Event action)](/v1/docs/en/core-search-actor) to be executed within a [Run as](/v1/docs/en/base-run-as-actor) event action to ensure read access for the calendars created in the possession of the various freight forwarders. The [Search (Event action)](/v1/docs/en/core-search-actor) will not be described in detail here. It is intended as a tuple search to find the first (and by convention: *only*) [Calendar](/v1/docs/en/administration-master-data-calendar) owned by a particular freight forwarder whose name is "LTL". As a projection, only the `id` field is needed for the [Calendar filter](/v1/docs/en/base-calendar-filter). The result of the tuple search is written to the variable `LTL@FWD`. - On the right side of the [Set value](/v1/docs/en/core-set-value-actor) event action, the "End of month" (`END_THIS_MONTH`) is first determined via the [Relative date with time](/v1/docs/en/core-date-time-value) value resolver. This "Date with time" is passed as an *input* *value* to a [Calendar filter](/v1/docs/en/base-calendar-filter) value resolver via concatenation. - In the [Calendar filter](/v1/docs/en/base-calendar-filter) value resolver, the [Calendar](/v1/docs/en/administration-master-data-calendar) determined for the relevant freight forwarder is referenced for the "check for working days" by assigning the [Object property](/v1/docs/en/core-property-resolver) `id` from the search result in the `LTL@FWD` variable to the **Calendar** parameter. - The **Jump backwards** option ensures that the `LTL_ultimate` variable (on the left side of the [Set value](/v1/docs/en/core-set-value-actor) event action) returns the latest calendar day defined as a working day in the freight forwarder’s calendar, which is before the end of the current month. **NOTE:** The fact that the `LTL_ultimate` date is already in the past at the time of the request is not dealt with separately here. | ![images/download/attachments/58596494/image2022-8-10_13-48-1-version-1-modificationdate-1660132081379-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-8-10_13-48-1-version-1-modificationdate-1660132081379-api-v2.png) | | --- | --- | | Runtime example: According to its "LTL" calendar, a freight forwarder offers transports for partial loads only on Thursdays as a rule. A query for the `LTL_ultimate` date in August 2022 results in the value shown to the right, which refers to the calendar day "Thursday, 25 August 2022". **NOTE:** The millisecond value in the `dateValue` field in the image on the right shows that the time (`23:59:59.999`) from the *input value* ("end of the month") is also reflected in the return value of the *calendar filter*. | Section from the "Storage" with variable values in a test run: ```plaintext LTL_ultimate ``` | ## Appointment offset by a predefined number of working days | A target date (`end`) is determined from a given date – here as a "Date with time" value in the variable start – by comparing it with a specific [Calendar](/v1/docs/en/administration-master-data-calendar). The target date is a specific number of working days (`offset`) after the `start` date. Configuration: Within an event action, the [For each loop](/v1/docs/en/core-for-each-entity-actor) shown on the right iterates over the `offset` variable, which defines the number of business days from `start` as an integer: - The [Set value](/v1/docs/en/core-set-value-actor) event action within the loop should assign the "next" business day to the `end` variable at each iteration. - The enables (on the right in the picture) a concatenation of the following value resolvers: - The previous value of the end variable serves as the initial value for the concatenation for each iteration. - In the first iteration, `end` (hopefully!) does not yet contain a value. Then the concatenated default value resolver assigns the actual [Default value](/v1/docs/en/core-default-value-resolver) from the `start` variable. - The following [Relative date with time](/v1/docs/en/core-date-time-value) value resolver adds exactly one calendar day to the input value with the **Type** "Custom" and the **Custom time** value `+1d`. - The concatenated [Calendar filter](/v1/docs/en/base-calendar-filter) value resolver checks whether the calendar day present as *input value* in the **Static** selected **Calendar "**24-5 (MON_FRI)" is a working day. - If this is true, this value is returned. - Otherwise, "Jump forward" will determine the next working day in the calendar and return it. At the end there should be exactly as many working days (according to the selected **Calendar**) difference between `start` and `end` as specified in the `offset` variable. **NOTE:** The configuration shown here assumes that the value of the `offset`>0 variable and the end variable does not contain a value (`$null`) at the beginning. | ![images/download/attachments/58596494/image2022-8-10_13-50-31-version-1-modificationdate-1660132231462-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-8-10_13-50-31-version-1-modificationdate-1660132231462-api-v2.png) | | --- | --- |