UNPKG

es-next-tools

Version:

A comprehensive utility library for JavaScript and TypeScript that provides a wide range of functions for common programming tasks, including mathematical operations, date manipulations, array and object handling, string utilities, and more.

11 lines (10 loc) 404 B
/** * Adds the specified number of days to the date. * @param {Date} date - The date to add days to. * @param {number} days - The number of days to add (can be negative). * @returns {Date} A new Date object with the days added. * @example * const date = new Date('2023-05-01'); * const newDate = addDays(date, 5); // 2023-05-06 */ export declare function addDays(date: Date, days: number): Date;