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

17 lines
683 B
Plaintext

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