/******************************************************************** * @author: Kaven * @email: kaven@wuwenkai.com * @website: http://blog.kaven.xyz * @file: [Kaven-Basic] /src/libs/date/Add.ts * @create: 2025-06-27 21:46:30.732 * @modify: 2025-07-11 21:19:12.898 * @version: 6.0.0 * @times: 11 * @lines: 116 * @copyright: Copyright © 2018-2025 Kaven. All Rights Reserved. * @description: [description] * @license: * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. ********************************************************************/ import { TTimeUnit } from "../type/advanced"; /** * Adds a specified amount of time to a given date and returns the resulting Date object. * * @param date - The original date to which the value will be added. * @param value - The amount of time to add. * @param unit - The unit of time to add (e.g., milliseconds, seconds, minutes). Defaults to milliseconds. * @returns A new Date object with the added time. * * @since 4.0.0 * @version 2021-12-14 */ export declare function AddDate(date: Date, value: number, unit?: TTimeUnit): Date; /** * Adds the specified number of milliseconds to the given date. * * @param date - The original Date object to which milliseconds will be added. * @param milliseconds - The number of milliseconds to add. * @returns A new Date object with the added milliseconds. */ export declare function AddMilliseconds(date: Date, milliseconds: number): Date; /** * Adds a specified number of seconds to a given date. * * @param date - The original Date object to which seconds will be added. * @param seconds - The number of seconds to add to the date. * @returns A new Date object with the specified number of seconds added. */ export declare function AddSeconds(date: Date, seconds: number): Date; /** * Adds the specified number of minutes to a given date. * * @param date - The original Date object to which minutes will be added. * @param minutes - The number of minutes to add to the date. * @returns A new Date object with the added minutes. */ export declare function AddMinutes(date: Date, minutes: number): Date; /** * Adds the specified number of hours to a given date. * * @param date - The original Date object to which hours will be added. * @param hours - The number of hours to add to the date. * @returns A new Date object with the added hours. */ export declare function AddHours(date: Date, hours: number): Date; /** * Adds a specified number of days to a given date. * * @param date - The original date to which days will be added. * @param days - The number of days to add to the date. * @returns A new `Date` object with the specified number of days added. */ export declare function AddDays(date: Date, days: number): Date; /** * Adds a specified number of weeks to the given date. * * @param date - The original date to which weeks will be added. * @param weeks - The number of weeks to add. Can be negative to subtract weeks. * @returns A new Date object with the specified number of weeks added. */ export declare function AddWeeks(date: Date, weeks: number): Date; //# sourceMappingURL=Add.d.ts.map