Class TimeSpanExtensions
TimeSpan extension methods
Inherited Members
Namespace: PayrollEngine.Client.Scripting
Assembly: PayrollEngine.Client.Scripting.dll
Syntax
public static class TimeSpanExtensions
Methods
View SourceRound(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 |
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 |
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 |