Soenneker.Extensions.DateTimeOffsets.Days 4.0.132

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Extensions.DateTimeOffsets.Days --version 4.0.132
                    
NuGet\Install-Package Soenneker.Extensions.DateTimeOffsets.Days -Version 4.0.132
                    
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="Soenneker.Extensions.DateTimeOffsets.Days" Version="4.0.132" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Extensions.DateTimeOffsets.Days" Version="4.0.132" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Extensions.DateTimeOffsets.Days" />
                    
Project file
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 Soenneker.Extensions.DateTimeOffsets.Days --version 4.0.132
                    
#r "nuget: Soenneker.Extensions.DateTimeOffsets.Days, 4.0.132"
                    
#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 Soenneker.Extensions.DateTimeOffsets.Days@4.0.132
                    
#: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=Soenneker.Extensions.DateTimeOffsets.Days&version=4.0.132
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Extensions.DateTimeOffsets.Days&version=4.0.132
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Extensions.DateTimeOffsets.Days

A collection of helpful DateTimeOffset day extension methods.

Installation

dotnet add package Soenneker.Extensions.DateTimeOffsets.Days

Quick start

using Soenneker.Extensions.DateTimeOffsets.Days;

DateTimeOffset dateTimeOffset = DateTimeOffset.UtcNow;
var result = dateTimeOffset.ToStartOfDay();

Common operations

  • ToStartOfDay() - Returns the start of the day that contains dateTimeOffset (00:00:00.0000000). This method does not convert time zones and does not normalize to UTC; it operates on the calendar date implied by dateTimeOffset and preserves DateTimeOffset.Offset.
  • ToEndOfDay() - Returns the end of the day that contains dateTimeOffset (one tick before the next day).
  • ToStartOfNextDay() - Returns the start of the next day relative to dateTimeOffset (00:00:00.0000000 of the following day).
  • ToStartOfPreviousDay() - Returns the start of the previous day relative to dateTimeOffset (00:00:00.0000000 of the prior day).
  • ToEndOfPreviousDay() - Returns the end of the previous day relative to dateTimeOffset (one tick before the current day begins).
  • ToEndOfNextDay() - Returns the end of the next day relative to dateTimeOffset (one tick before the day after next begins).
  • ToStartOfTzDay() - Computes the start of the local day in tz that contains the instant utcInstant, returning the result as a UTC instant. This method determines the local calendar date in tz for the given instant, constructs local midnight (wall time), and converts that wall time to UTC using the time zone's adjustment rules.
  • ToStartOfPreviousTzDay() - Computes the start of the previous local day in tz relative to the instant utcInstant, returning the result as a UTC instant. Equivalent to ToStartOfTzDayCore(utcInstant, tz, -1).
  • ToStartOfNextTzDay() - Computes the start of the next local day in tz relative to the instant utcInstant, returning the result as a UTC instant. Equivalent to ToStartOfTzDayCore(utcInstant, tz, 1).
  • ToEndOfTzDay() - Computes the end of the local day in tz that contains the instant utcInstant, returning the result as a UTC instant.
  • ToEndOfPreviousTzDay() - Computes the end of the previous local day in tz relative to the instant utcInstant, returning the result as a UTC instant.
  • ToEndOfNextTzDay() - Computes the end of the next local day in tz relative to the instant utcInstant, returning the result as a UTC instant.

The package also includes one additional operation for more specialized cases.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Soenneker.Extensions.DateTimeOffsets.Days:

Package Downloads
Soenneker.Extensions.DateTimeOffsets.DayOfWeeks

A collection of helpful DateTimeOffset DayOfWeek extension methods

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.146 0 9/7/2026
4.0.145 0 9/7/2026
4.0.144 41 9/7/2026
4.0.143 178 9/4/2026
4.0.142 41 9/4/2026
4.0.141 46 9/4/2026
4.0.140 223 9/1/2026
4.0.139 166 8/31/2026
4.0.138 131 8/31/2026
4.0.137 131 8/31/2026
4.0.136 137 8/31/2026
4.0.135 197 8/30/2026
4.0.134 89 8/30/2026
4.0.133 85 8/30/2026
4.0.132 269 8/29/2026
4.0.131 383 8/26/2026
4.0.130 194 8/26/2026
4.0.129 97 8/25/2026
4.0.128 252 8/22/2026
4.0.127 180 8/21/2026
Loading failed

Improve README documentation