API reference
isWeekend
API index · Input types and conventions · Installation
isWeekend(value, options?) → boolean
Check whether the value's own local date has a weekday listed in weekendDays. Does not accept a viewing zone; convert a zoned value first if needed.
import { isWeekend } from '@frantss/temporal-fns';
isWeekend(Temporal.PlainDate.from('2026-10-24')); // => true
isWeekend(Temporal.PlainDate.from('2026-10-23')); // => false
isWeekend(Temporal.PlainDate.from('2026-10-23'), { weekendDays: [5, 6] }); // => true
isWeekend(Temporal.PlainDate.from('2026-10-24'), { weekendDays: [] }); // => falseRelated: isBusinessDay, eachWeekendOfInterval, addBusinessDays.
Behaviors: BUS-004: Weekend and business predicates are exact inverses; BUS-016: Weekend predicates use the value's own local date; BUS-017: All weekend consumers validate a configuration with no working day.