isWeekend

Calendar
stable

Returns true when the given Date falls on a Saturday (day 6) or Sunday (day 0). Used to paint the weekend stripe in calendar month and week views.

API

Signature

Full TypeScript signature sourced from the util file.

typescript

API

Parameters

Input parameters accepted by this util.

date
required
Date
The date to test.

API

Return value

The value returned by this util.

true when the date is Saturday or Sunday, false otherwise.

Usage

Examples

Ready-to-paste usage snippets.

Detect weekend days

typescript