Class TimeSpanExtensions
These methods help to convert jira working time to real time and back
Inheritance
Inherited Members
Namespace:Dapplo.Jira
Assembly:Dapplo.Jira.dll
Syntax
public static class TimeSpanExtensions
Methods
| Improve this Doc View SourceFromWorkingTime(String, TimeTrackingConfiguration)
Declaration
public static TimeSpan FromWorkingTime(string workingTime, TimeTrackingConfiguration timeTrackingConfiguration = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | workingTime | string from Jira |
TimeTrackingConfiguration | timeTrackingConfiguration | TimeTrackingConfiguration |
Returns
Type | Description |
---|---|
System.TimeSpan |
TimeSpanToIncrement(Nullable<TimeSpan>)
Create an increment from the timespan. increment has of (+/-)nn(y|M|w|d|h|m) If the plus/minus(+/-) sign is omitted, plus is assumed. nn: number; y: year, M: month; w: week; d: day; h: hour; m: minute.
Declaration
public static string TimeSpanToIncrement(this TimeSpan? timeSpan)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.TimeSpan> | timeSpan | TimeSpan to convert |
Returns
Type | Description |
---|---|
System.String | string |
ToWorkingTime(Nullable<TimeSpan>, TimeTrackingConfiguration)
Create an increment from the timespan. increment has of (+/-)nn(y|M|w|d|h|m) If the plus/minus(+/-) sign is omitted, plus is assumed. nn: number; y: year, M: month; w: week; d: day; h: hour; m: minute.
Declaration
public static string ToWorkingTime(this TimeSpan? timeSpan, TimeTrackingConfiguration timeTrackingConfiguration = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.TimeSpan> | timeSpan | TimeSpan to convert |
TimeTrackingConfiguration | timeTrackingConfiguration | TimeTrackingConfiguration for calculating the values |
Returns
Type | Description |
---|---|
System.String | string |
ToWorkingTime(TimeSpan, TimeTrackingConfiguration)
Create something that represents the jira working time format (+/-)nn(y|M|w|d|h|m) nn: number; y: year, M: month; w: week; d: day; h: hour; m: minute.
Declaration
public static string ToWorkingTime(this TimeSpan timeSpan, TimeTrackingConfiguration timeTrackingConfiguration = null)
Parameters
Type | Name | Description |
---|---|---|
System.TimeSpan | timeSpan | TimeSpan to convert |
TimeTrackingConfiguration | timeTrackingConfiguration | TimeTrackingConfiguration for calculating the values |
Returns
Type | Description |
---|---|
System.String | string |