Skip to content

Commit b7d6d51

Browse files
author
nianiB9
committed
Update cursorDate to calculate date from 1 year ago
1 parent c720ee8 commit b7d6d51

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/monitor/examples/getMonitoringData.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ const getMonitoringData = async (args) => {
1717
//ds-snippet-end:Monitor1Step2
1818

1919
//ds-snippet-start:Monitor1Step3
20+
const cursorDate = new Date();
21+
cursorDate.setFullYear(cursorDate.getFullYear() - 1);
2022
const limit = 2000; // Amount of records you want to read in one request
2123
let functionResult = [];
2224

2325
let complete = false;
24-
let cursorValue, cursoredResult;
26+
let cursorValue = cursorDate.toISOString().split('T')[0] + "T00:00:00Z", cursoredResult;
2527
const datasetApi = new docusign.DataSetApi(dsApiClient);
2628

2729
let options = {

0 commit comments

Comments
 (0)