Ephemeral 0.2.0-beta.6
This is a prerelease version of Ephemeral.
dotnet add package Ephemeral --version 0.2.0-beta.6
NuGet\Install-Package Ephemeral -Version 0.2.0-beta.6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ephemeral" Version="0.2.0-beta.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ephemeral" Version="0.2.0-beta.6" />
<PackageReference Include="Ephemeral" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ephemeral --version 0.2.0-beta.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Ephemeral, 0.2.0-beta.6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ephemeral@0.2.0-beta.6
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ephemeral&version=0.2.0-beta.6&prerelease
#tool nuget:?package=Ephemeral&version=0.2.0-beta.6&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Ephemeral
C# Library to handle time intervals (composite start and end)
- Support for open and closed (time) intervals.
- Support for common operations like Covers(), Intersect(), Join(), etc..
- Support for (disjoint) collections of intervals.
- Makes use of Optional to avoid returning
null
in many of the built-in operations.
The API-documentation is hosted at albertogregorio.com/ephemeral.
Examples
Interval Example
var now = DateTimeOffset.UtcNow;
Interval yesterday = Interval.CreateOpen(now.AddDays(-1), now);
Interval today = yesterday.Shift(TimeSpan.FromDays(1));
yesterday.Overlaps(today); // returns true
(Disjoint) Interval Collection Example
IDisjointIntervalSet collection = new DisjointIntervalSet();
collection.Add(yesterday);
collection.Add(today);
collection.Start == yesterday.Start; // true
collection.End == today.End; // true
var yesterdayAndToday = yesterday.Union(today);
collection.equals(yesterdayAndToday); // true
var consolidatedCollection = yesterdayAndToday.Consolidate(); // joins the two internal intervals into one
yesterdayAndToday.Count(); // 2
consolidatedCollection.Count(); // 1
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.1
- Optional (>= 4.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
0.2.0-beta.6 | 124 | 6/2/2025 |
0.2.0-beta.5 | 74 | 5/31/2025 |
0.2.0-beta.4 | 90 | 5/30/2025 |
0.2.0-beta.3 | 90 | 5/30/2025 |
0.2.0-beta.2 | 94 | 5/30/2025 |
0.2.0-beta.1 | 100 | 5/30/2025 |
0.2.0-alpha.6 | 119 | 5/28/2025 |
0.2.0-alpha.5 | 118 | 5/28/2025 |
0.2.0-alpha.4 | 121 | 5/28/2025 |
0.2.0-alpha.3 | 112 | 5/28/2025 |
0.2.0-alpha.2 | 116 | 5/28/2025 |
0.2.0-alpha.1 | 118 | 5/28/2025 |
0.2.0-alpha | 120 | 5/28/2025 |
0.1.13 | 225 | 9/1/2023 |
0.1.12 | 149 | 9/1/2023 |
0.1.11 | 617 | 2/26/2022 |
0.1.10 | 901 | 7/30/2021 |
0.1.9 | 391 | 7/7/2021 |
0.1.8 | 417 | 2/23/2021 |
0.1.7 | 538 | 7/2/2020 |
0.1.6 | 485 | 7/2/2020 |
0.1.5 | 509 | 7/2/2020 |
0.1.4 | 500 | 7/2/2020 |
0.1.3 | 498 | 7/2/2020 |
0.1.2 | 536 | 7/1/2020 |
0.1.1 | 527 | 7/1/2020 |
0.1.0 | 627 | 10/5/2019 |
0.0.0-alpha.0 | 341 | 7/2/2020 |