Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

BussinessCalendar.addDays function adds an extra day to weekends

SA-19285

Summary



When days are added to Saturday or Sunday in BussinessCalendar.addDays(), an extra day is added in the result.


Error Messages



Not Applicable


Steps to Reproduce



Add 1 day to weekend days (Saturday or Sunday) and check the result.


Root Cause



An issue in custom application code or rules.

Resolution

The addDays() functions evaluates input and calculate results in three steps:

  1. Evaluate a DateTime value for the starting date.
    • The date specified is evaluated to determine if the date is a business day. (The time of day is not evaluated.)
    • If the specified day is a business day, then that date is used for calculation.
    • If the specified day is not a business day, then the date is rolled forward, using the calendar provided, to the next business day.
​​The date resulting from this step, which is used in the following steps, might not be the original date specified, the date rolls forward and you see one day extra.

Published February 11, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us