Skip to content
0

katanakit-js / useAddDays

Function: useAddDays() ​

ts
function useAddDays(date, days): string;

Defined in: src/core/services/dates.service.ts:638

Adds a number of days to a date.

Parameters ​

ParameterTypeDescription
datestring | PlainDateBase date (ISO string or PlainDate).
daysnumberNumber of days to add (can be negative).

Returns ​

string

The resulting date as an ISO string.

Example ​

ts
useAddDays("2024-01-01", 10); // "2024-01-11"

Released under the MIT License.