addSeconds


Adds seconds to a specific date/time.

Parameters

Parameter Data Type Description
date Date The date/time to add the number of seconds to.
secs Number The number of seconds to add to date. The range is from -8640000001 to 8640000000.

Return Values

Value Data Type Description
date Date The date/time after adding the number of seconds.

Samples

var d = new Date("2021-03-19 02:19:08");
msg = addSeconds(d,30);
return tools.resultBuilder.build(true, JSON.stringify(msg));


Output

"2021-03-19T02:19:38.000Z"