The code provided below can be used for the endpoint to return a date by adding a specific number of days to the current day. The script excludes holidays and weekends when adding the days and considers the current date and time in the UK timezone. /** *@NApiVersion 2.1 *@NScriptType Suitelet */ define([‘N/format’, ‘N/search’], … Continue reading The endpoint for returning dates by adding specific dates to current date
Tag: date calculation
Finding due date value from current date based on the number of days
REQUIREMENT Need to set the due date of a task record based on the current date and number of days required for the completion. The due date must not be weekend days and should consider only weekdays. SOLUTION Following is a code snippet for calculating the due date excluding the weekend days. settingDueDateValue(days) { try… Continue reading Finding due date value from current date based on the number of days
Adding n Number of business days to the specified date :
The following code will generate add n business days to a date (d).