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)
Syntax
public static class DateTimeOperations

The DateTimeOperations type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAddDays
Adds the specified number of days to the value of this instance.
Public methodStatic memberAddHours
Adds the specified number of hours to the value of this instance.
Public methodStatic memberAddMinutes
Adds the specified number of minutes to the value of this instance.
Public methodStatic memberAddSeconds
Adds the specified number of seconds to the value of this instance.
Public methodStatic memberGetDaysOfWeek
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 methodStatic memberMultipliedWith
Multiplies the time span with the specified factor.
Public methodStatic memberRoundToDays(DateTime)
Rounds the time span so it does not contain any fractional days.
Public methodStatic memberRoundToDays(DateTime, FuncDouble, Double)
Rounds the time span so it does not contain any fractional days.
Public methodStatic memberRoundToHours(DateTime)
Rounds the time span so it does not contain any fractional hours.
Public methodStatic memberRoundToHours(TimeSpan)
Rounds the time span so it does not contain any fractional hours.
Public methodStatic memberRoundToHours(DateTime, FuncDouble, Double)
Rounds the time span so it does not contain any fractional hours.
Public methodStatic memberRoundToHours(TimeSpan, FuncDouble, Double)
Rounds the time span so it does not contain any fractional hours.
Public methodStatic memberRoundToMinutes(DateTime)
Rounds the time span so it does not contain any fractional minutes.
Public methodStatic memberRoundToMinutes(TimeSpan)
Rounds the time span so it does not contain any fractional minutes.
Public methodStatic memberRoundToMinutes(DateTime, FuncDouble, Double)
Rounds the time span so it does not contain any fractional minutes.
Public methodStatic memberRoundToMinutes(TimeSpan, FuncDouble, Double)
Rounds the time span so it does not contain any fractional minutes.
Public methodStatic memberRoundToSeconds(DateTime)
Rounds the time span so it does not contain any fractional seconds.
Public methodStatic memberRoundToSeconds(TimeSpan)
Rounds the time span so it does not contain any fractional seconds.
Public methodStatic memberRoundToSeconds(DateTime, FuncDouble, Double)
Rounds the time span so it does not contain any fractional seconds.
Public methodStatic memberRoundToSeconds(TimeSpan, FuncDouble, Double)
Rounds the time span so it does not contain any fractional seconds.
Top
See Also