Show / Hide Table of Contents

Class TimeSpanExtensions

TimeSpan extension methods

Inheritance
object
TimeSpanExtensions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: PayrollEngine.Client.Scripting
Assembly: PayrollEngine.Client.Scripting.dll
Syntax
public static class TimeSpanExtensions

Methods

View Source

Round(TimeSpan, TimeSpan)

Rounds a time interval to the nearest value

Declaration
public static TimeSpan Round(this TimeSpan timeSpan, TimeSpan stepSize)
Parameters
Type Name Description
TimeSpan timeSpan
TimeSpan stepSize

Size of the rounding step

Returns
Type Description
TimeSpan

The rounded time interval

View Source

RoundDown(TimeSpan, TimeSpan)

Rounds a time interval down

Declaration
public static TimeSpan RoundDown(this TimeSpan timeSpan, TimeSpan stepSize)
Parameters
Type Name Description
TimeSpan timeSpan
TimeSpan stepSize

Size of the rounding step

Returns
Type Description
TimeSpan

The rounded time interval

View Source

RoundUp(TimeSpan, TimeSpan)

Rounds a time interval up

Declaration
public static TimeSpan RoundUp(this TimeSpan timeSpan, TimeSpan stepSize)
Parameters
Type Name Description
TimeSpan timeSpan
TimeSpan stepSize

Size of the rounding step

Returns
Type Description
TimeSpan

The rounded time interval

  • View Source
☀
☾
Back to top Generated by DocFX