Skip to content

Function: isWeekend() ​

ts
function isWeekend(date): boolean;

Saturday or Sunday in local time. 本地时间是否为周六或周日。

Parameters ​

ParameterType
dateDate

Returns ​

boolean

Example ​

ts
isWeekend(new Date(2026, 4, 9)) // 2026-05-09 is Saturday → true

Since ​

1.0.0

Released under the MIT License.