Files
NapCatQQ/.pnpm-store/v3/files/8c/93d9e52041ff2e6141d58a219ed988e2e08b660a45db4e824a19d41f36d060ebedb2027061785f7d530495d8a4d05017c8b98f41556585af49c910da6e4b8c
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

17 lines
654 B
Plaintext

/**
* Subtracts a specified number of months from a date.
* 从日期中减去指定数量的月份。
*
* @param date - The date to subtract months from. (要减去月份的日期。)
* @param months - The number of months to subtract. (要减去的月份数。)
* @returns A new date with the subtracted months. (减去月份后的新日期。)
* @example
* ```ts
* //Subtracting 2 months from a date (从日期中减去2)
* const date = new Date('2023-10-31T12:00:00Z');
* subMonths(date, 2);
* // Returns: 2023-08-31T12:00:00Z (返回: 2023-08-31T12:00:00Z)
* ```
*/
export default function subMonths(date: Date, months: number): Date;