Class StringExtensions
Time-related extension methods for
Inheritance
System.Object
StringExtensions
Namespace: X10D.Time
Assembly: X10D.dll
Syntax
public static class StringExtensions : object
Methods
| Improve this Doc View SourceToTimeSpan(String)
Parses a shorthand time span string (e.g. 3w 2d 1h) and converts it to an instance of
Declaration
public static TimeSpan ToTimeSpan(this string input)
Parameters
Type | Name | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
System.String | input | The input string. Floating point is not supported, but integers with the following units are supported:
|
Returns
Type | Description |
---|---|
TimeSpan | A new instance of |