Skip to content

Period.DaysBetween Method

Definition

Namespace: Corvus.Text.Json
Assembly: Corvus.Text.Json.dll
Source: Period.cs

DaysBetween(LocalDate, LocalDate)

Returns the number of days between two LocalDate objects.

public static int DaysBetween(LocalDate start, LocalDate end)

Parameters

Name Type Description
start LocalDate Start date/time.
end LocalDate End date/time.

Returns

int

The number of days between the given dates.

Exceptions

Exception Description
ArgumentException start and end use different calendars.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests.

Open an issue