AS:AddWorkingDays - Function Add working days does not count with Holidays

I was trying to …

I have XSLT transformation where I can set previous working date into a field:

<xsl:attribute name="FulfilDate">
    select="AS:AddWorkingDays(AS:FormatDate('2021-07-07T00:00:00', 'yyyy-MM-ddT00:00:00'), -1, AS:GetConstant('DefaultCalendarId'))"/>

I have setup calendar with Holidays

I was expecting …

For date 2021-07-07T00:00:00 I expect this result:

2.7.2021: FulfilDate=“2021-07-02T00:00:00.0000000+02:00”`

Instead I’ve got …

6.7.2021: FulfilDate="2021-07-06T00:00:00.0000000+02:00"


For the weekends it works correctly. For input

<xsl:attribute name="FulfilDate">
    select="AS:AddWorkingDays(AS:FormatDate('2021-07-19T00:00:00', 'yyyy-MM-ddT00:00:00'), -1, AS:GetConstant('DefaultCalendarId'))"/>

I receive correctly:


Due to the following filter

	[OrigamCalendar].[Id] = [OrigamCalendarDetail].[refOrigamCalendarId] AND  (
	 ([OrigamCalendar].[Id] = @OrigamCalendar_parId)))
	AND  (
	 (([OrigamCalendarDetail].[Date] >= @OrigamCalendarDetail_parDate)));

it does not work well with negative values. We need to remove this filtering by date from the filter set.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.