Validating Settlement Date
This function performs the following validation on the date input:
-
Checks the date is in the future (is after the current date), if the date is in the past then the service returns
valid=false -
If the date input is in the future, the service will calculate the execution date by subtracting the
settlementLeadDaysfrom the settlement date, taking into account non-working days as defined in thecalendarIdinput), if the execution date calculated is in the past the service returnsvalid=false -
If the date input is in the future, the service will calculate the execution date by subtracting the
settlementLeadDaysfrom the settlement date, taking into account non-working days as defined in thecalendarIdinput), if the execution date calculated is not in the past the service returnsvalid=trueand the input date as settlement date as well as calculated execution date -
If the date input is in the future, the service will calculate the execution date by subtracting the
settlementLeadDaysfrom the settlement date, taking into account non-working days as defined in thecalendarIdinput), if the execution date calculated is the same as the current date and the current time is before the cutoff then service returnsvalid=trueand the input date as settlement date as well as calculated execution date -
If the date input is in the future, the service will calculate the execution date by subtracting the
settlementLeadDaysfrom the settlement date, taking into account non-working days as defined in thecalendarIdinput), if the execution date calculated is the same as the current date and the current time is after the cutoff then service returnsvalid=false -
If the date input is the current date and the current time is after the cutOffTime input, then the service will return
valid=false -
If the date input is the current date and the current time is before the cutOffTime input, then the service will return
valid=true, the date passed in as well as the calculated settlement date (which is calculated by adding thesettlementLeadDaysto the execution date, taking into account non-working days as defined in thecalendarIdinput)