Click or drag to resize

DateTimeOperations Class

Additional operations for DateTime and TimeSpan.
Inheritance Hierarchy
SystemObject
  TomsToolbox.EssentialsDateTimeOperations

Namespace: TomsToolbox.Essentials
Assembly: TomsToolbox.Essentials (in TomsToolbox.Essentials.dll) Version: 2.21.0+44d18b541fc9419ec3c549350a832394661b2a4d
XMLNS for XAML: Not mapped to an xmlns.
Syntax
public static class DateTimeOperations

The DateTimeOperations type exposes the following members.

Methods
 NameDescription
Public Extension MethodAddDays Adds the specified number of days to the value of this instance.
Public Extension MethodAddHours Adds the specified number of hours to the value of this instance.
Public Extension MethodAddMinutes Adds the specified number of minutes to the value of this instance.
Public Extension MethodAddSeconds Adds the specified number of seconds to the value of this instance.
Public Extension MethodGetDaysOfWeek Gets the days of a week starting with the cultures first day of week.
Public methodStatic memberMax(DateTime, DateTime) Returns the larger of two dates.
Public methodStatic memberMax(TimeSpan, TimeSpan) Returns the larger of two time spans.
Public methodStatic memberMin(DateTime, DateTime) Returns the smaller of two dates.
Public methodStatic memberMin(TimeSpan, TimeSpan) Returns the smaller of two time spans.
Public Extension MethodMultipliedWith Multiplies the time span with the specified factor.
Public Extension MethodRoundToDays(DateTime) Rounds the time span so it does not contain any fractional days.
Public Extension MethodRoundToDays(DateTime, FuncDouble, Double) Rounds the time span so it does not contain any fractional days.
Public Extension MethodRoundToHours(DateTime) Rounds the time span so it does not contain any fractional hours.
Public Extension MethodRoundToHours(TimeSpan) Rounds the time span so it does not contain any fractional hours.
Public Extension MethodRoundToHours(DateTime, FuncDouble, Double) Rounds the time span so it does not contain any fractional hours.
Public Extension MethodRoundToHours(TimeSpan, FuncDouble, Double) Rounds the time span so it does not contain any fractional hours.
Public Extension MethodRoundToMinutes(DateTime) Rounds the time span so it does not contain any fractional minutes.
Public Extension MethodRoundToMinutes(TimeSpan) Rounds the time span so it does not contain any fractional minutes.
Public Extension MethodRoundToMinutes(DateTime, FuncDouble, Double) Rounds the time span so it does not contain any fractional minutes.
Public Extension MethodRoundToMinutes(TimeSpan, FuncDouble, Double) Rounds the time span so it does not contain any fractional minutes.
Public Extension MethodRoundToSeconds(DateTime) Rounds the time span so it does not contain any fractional seconds.
Public Extension MethodRoundToSeconds(TimeSpan) Rounds the time span so it does not contain any fractional seconds.
Public Extension MethodRoundToSeconds(DateTime, FuncDouble, Double) Rounds the time span so it does not contain any fractional seconds.
Public Extension MethodRoundToSeconds(TimeSpan, FuncDouble, Double) Rounds the time span so it does not contain any fractional seconds.
Top
See Also