date-vir - v9.4.1
    Preparing search index...

    Function diffDateOnlyDays

    • Counts the whole calendar days from start to end. Negative when end is before start. Add 1 for an inclusive count of the days in the range.

      Parameters

      Returns number

      import {createUtcFullDate, diffDateOnlyDays, toDateOnlyUtcIsoString} from 'date-vir';

      diffDateOnlyDays({
      start: toDateOnlyUtcIsoString(createUtcFullDate('2026-10-02T00:00:00.000Z')),
      end: toDateOnlyUtcIsoString(createUtcFullDate('2026-10-05T00:00:00.000Z')),
      }); // outputs `3`