Files
NapCatQQ/.pnpm-store/v3/files/a6/85e11fd72728c25c40823e428acc386f8e5ed96b278f4cea8123fb9cef8c8ef711db1d203218a2ac0274bf2ccd430af4c0bca3a7b69d5dc247018aaa404319
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

17 lines
692 B
Plaintext

/**
* Adds a specified number of months to a date.
* 向日期添加指定数量的月份。
*
* @param date - The date to add months to. (要添加月份的日期。)
* @param months - The number of months to add. (要添加的月份数。)
* @returns A new date with the added months. (添加月份后的新日期。)
* @example
* ```ts
* // Adding 2 months to a date (向日期添加2个月)
* const originalDate = new Date('2023-10-31T12:00:00');
* addMonths(originalDate, 2);
* console.log(originalDate.toISOString()); // Outputs: '2023-12-31T12:00:00.000Z' (输出: '2023-12-31T12:00:00.000Z')
* ```
*/
export default function addMonths(date: Date, months: number): Date;