Create date math
post
https://ris.rightsline.com
/v4/date-math
Create date math

ParentCalc object

1
{
2
"entityTypeId":4, // char type ID
3
"id":618, // record ID
4
"tagLabel": "contract_term_start", // tag label of source characteristic
5
"yearQuantity": 0, // quantity in years
6
"monthQuantity": 0, // quantity in months
7
"weekQuantity": 0, // quantity in weeks
8
"dayQuantity": 15, // quantity in days
9
"dayUnit": "Days", // unit for days (Days/BusinessDays)
10
"isPriorTo": false, // before or after source date
11
"sortOrder": 1 // order in which date is calculated
12
}
Copied!

Example

Calculate the contract_term_end for deal record 618 as the earliest of the following two source dates:
  1. 1.
    15 days prior to the contract_date of deal record 620, or
  2. 2.
    15 days after (isPriorTo = false) the contract_term_start date on deal 621.
1
{
2
"type":"EARLIESTOF",
3
"childEntityTypeId":4,
4
"childId":618,
5
"childTagLabel":"contract_term_end",
6
"recalcOption":"OPEN",
7
"parentCalcs":[
8
{
9
"entityTypeId":4,
10
"id":620,
11
"tagLabel": "contract_date",
12
"dayQuantity": 15,
13
"dayUnit": "DAYS",
14
"isPriorTo": true,
15
"sortOrder": 0
16
},
17
{
18
"entityTypeId":4,
19
"id":621,
20
"tagLabel": "contract_term_start",
21
"dayQuantity": 15,
22
"dayUnit": "DAYS",
23
"isPriorTo": false,
24
"sortOrder": 1
25
}
26
]
27
}
Copied!