xtd 0.2.0
Loading...
Searching...
No Matches

◆ try_parse()

static bool xtd::time_span::try_parse ( const string value,
time_span result 
)
static

Converts the string representation of a time interval to its xtd::time_span equivalent and returns a value that indicates whether the conversion succeeded.

Parameters
valueA string that specifies the time interval to convert.
resultWhen this method returns, contains an object that represents the time interval specified by value, or xtd::time_span::zero if the conversion failed.
Returns
true if s was converted successfully; otherwise, false. This operation returns false if the value parameter is empty (""), has an invalid format, represents a time interval that is less than xtd::time_span::min_value or greater than xtd::time_span::max_value, or has at least one days, hours, minutes, or seconds component outside its valid range.