diffMinutes

Calendar
stable

Returns the difference between two dates expressed in minutes (positive when b is after a). Used by the calendar component for event-height calculations in week / day timelines.

API

Signature

Full TypeScript signature sourced from the util file.

typescript

API

Parameters

Input parameters accepted by this util.

a
required
Date
The start date (reference).
b
required
Date
The end date. A positive value is returned when b is after a.

API

Return value

The value returned by this util.

The rounded difference in minutes between b and a. Negative when b is before a.

Usage

Examples

Ready-to-paste usage snippets.

Event duration in minutes

typescript