PeanutButter
Loading...
Searching...
No Matches
PeanutButter.Utils.TimeSpanExtensions Class Reference

Adds methods similar to those found on DateTime to TimeSpan. More...

Static Public Member Functions

static TimeSpan AddDays (this TimeSpan ts, double howMany)
 Add this many days to the TimeSpan, returning the new value.
static TimeSpan AddHours (this TimeSpan ts, double howMany)
 Add this many days to the TimeSpan, returning the new value.
static TimeSpan AddMinutes (this TimeSpan ts, double howMany)
 Add this many days to the TimeSpan, returning the new value.
static TimeSpan AddSeconds (this TimeSpan ts, double howMany)
 Add this many days to the TimeSpan, returning the new value.
static TimeSpan AddMilliseconds (this TimeSpan ts, double howMany)
 Add this many days to the TimeSpan, returning the new value.
static TimeSpan TruncateMilliseconds (this TimeSpan timeSpan)
 Returns a new TimeSpan equal to the input with truncated milliseconds.
static TimeSpan TruncateSeconds (this TimeSpan timeSpan)
 Returns a new TimeSpan equal to the input with truncated milliseconds.
static TimeSpan TruncateMinutes (this TimeSpan timeSpan)
 Returns a new TimeSpan equal to the input with truncated milliseconds.
static TimeSpan TruncateHours (this TimeSpan timeSpan)
 Returns a new TimeSpan equal to the input with truncated milliseconds.

Detailed Description

Adds methods similar to those found on DateTime to TimeSpan.

Member Function Documentation

◆ AddDays()

TimeSpan PeanutButter.Utils.TimeSpanExtensions.AddDays ( this TimeSpan ts,
double howMany )
static

Add this many days to the TimeSpan, returning the new value.

Parameters
ts
howMany
Returns

◆ AddHours()

TimeSpan PeanutButter.Utils.TimeSpanExtensions.AddHours ( this TimeSpan ts,
double howMany )
static

Add this many days to the TimeSpan, returning the new value.

Parameters
ts
howMany
Returns

◆ AddMilliseconds()

TimeSpan PeanutButter.Utils.TimeSpanExtensions.AddMilliseconds ( this TimeSpan ts,
double howMany )
static

Add this many days to the TimeSpan, returning the new value.

Parameters
ts
howMany
Returns

◆ AddMinutes()

TimeSpan PeanutButter.Utils.TimeSpanExtensions.AddMinutes ( this TimeSpan ts,
double howMany )
static

Add this many days to the TimeSpan, returning the new value.

Parameters
ts
howMany
Returns

◆ AddSeconds()

TimeSpan PeanutButter.Utils.TimeSpanExtensions.AddSeconds ( this TimeSpan ts,
double howMany )
static

Add this many days to the TimeSpan, returning the new value.

Parameters
ts
howMany
Returns

◆ TruncateHours()

TimeSpan PeanutButter.Utils.TimeSpanExtensions.TruncateHours ( this TimeSpan timeSpan)
static

Returns a new TimeSpan equal to the input with truncated milliseconds.

Parameters
timeSpan
Returns

◆ TruncateMilliseconds()

TimeSpan PeanutButter.Utils.TimeSpanExtensions.TruncateMilliseconds ( this TimeSpan timeSpan)
static

Returns a new TimeSpan equal to the input with truncated milliseconds.

Parameters
timeSpan
Returns

◆ TruncateMinutes()

TimeSpan PeanutButter.Utils.TimeSpanExtensions.TruncateMinutes ( this TimeSpan timeSpan)
static

Returns a new TimeSpan equal to the input with truncated milliseconds.

Parameters
timeSpan
Returns

◆ TruncateSeconds()

TimeSpan PeanutButter.Utils.TimeSpanExtensions.TruncateSeconds ( this TimeSpan timeSpan)
static

Returns a new TimeSpan equal to the input with truncated milliseconds.

Parameters
timeSpan
Returns

The documentation for this class was generated from the following file:
  • source/Utils/PeanutButter.Utils/TimeSpanExtensions.cs