API reference
isSameISOWeek
API index · Input types and conventions · Installation
isSameISOWeek(value, base, options?) → boolean
Check whether two values share the same Monday-based ISO week. Matching week numbers from different week-years do not imply equality. Only applicable zone context is accepted as an option.
import { isSameISOWeek } from '@frantss/temporal-fns';
isSameISOWeek(Temporal.PlainDate.from('2026-10-19'), Temporal.PlainDate.from('2026-10-25')); // => true
isSameISOWeek(Temporal.PlainDate.from('2026-10-18'), Temporal.PlainDate.from('2026-10-19')); // => false
isSameISOWeek(Temporal.PlainDate.from('2025-01-01'), Temporal.PlainDate.from('2026-01-01')); // => falseRelated: isSameWeek, startOfISOWeek, getWeekYear.
Behaviors: CMP-001: Period equality checks the period and its year; CMP-003: Week equality crosses a calendar-year boundary; CMP-004: Equal week numbers in different years do not imply equal weeks.