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

21 lines
787 B
Plaintext

/**
* Gets the number of days in the month for a given date.
* 获取给定日期所在月份的天数。
*
* @param date - The date to get the number of days in the month for. (要获取月份天数的日期。)
* @returns The number of days in the month. (月份的天数。)
* @example
* ```ts
* // Getting the number of days in October 2023 (获取2023年10月的天数)
* const date = new Date('2023-10-01');
* const days = daysInMonth(date);
* console.log(days); // Outputs: 31 (输出: 31)
*
* // Getting the number of days in February 2024 (获取2024年2月的天数)
* const date2 = new Date('2024-02-01');
* const days2 = daysInMonth(date2);
* console.log(days2); // Outputs: 29 (输出: 29)
* ```
*/
export default function daysInMonth(date: Date): number;