temporal-fns
API reference

isSameDay

API index · Input types and conventions · Installation

isSameDay(value, base, options?) → boolean

Check whether two values fall on the same calendar date in the selected context.

import { isSameDay } from '@frantss/temporal-fns';

isSameDay(
  Temporal.PlainDateTime.from('2026-10-23T00:00'),
  Temporal.PlainDateTime.from('2026-10-23T23:59'),
); // => true
const a = Temporal.Instant.from('2026-01-01T00:30Z');
const b = Temporal.Instant.from('2026-01-01T03:30Z');
isSameDay(a, b, { timeZone: 'UTC' }); // => true
isSameDay(a, b, { timeZone: 'America/Montevideo' }); // => false

Related: isSameWeek, formatRelative, isWithinInterval.

Behaviors: CMP-001: Period equality checks the period and its year; CMP-002: Plain date-time comparisons ignore clocks; CMP-007: Instant comparisons use the supplied zone; CMP-008: Different zoned inputs require a common viewing zone.