Skip to content

Commit 9cc1867

Browse files
Create README.md
1 parent a3622f0 commit 9cc1867

File tree

1 file changed

+14
-0
lines changed
  • Core ServiceNow APIs/GlideDateTime/Calculate Due date using user defined schedules

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
**Description:**
2+
This Script Include calculates a future due date by adding a specified number of business days to a given start date, based on a defined schedule.
3+
This can be used anywhere within the server side scripts like fix scripts, background scripts, UI Action (server script).
4+
5+
**Pre-requisite:**
6+
A schedule record with valid schedule entries should be created in the cmn_schedule table
7+
8+
**Sample:**
9+
var daysToAdd = 4; // No of days need to be added
10+
var script = new CaclculateDueDate().calculateDueDate(new GlideDateTime(),daysToAdd); // Passing the current date and daysToAdd value to script include
11+
gs.print(script);
12+
13+
**Output:**
14+
*** Script: 2025-10-09 11:23:34

0 commit comments

Comments
 (0)