Click or drag to resize

DayTryFromString Method

Tries to parse a string date in ISO YYYY-MM-DD format (the format used by XML schema's date type), or YYYYMMDD format. Returns true if it succeeds.

Namespace: DegreeDays.Time
Assembly: DegreeDays (in DegreeDays.dll) Version: 1.4
Syntax
public static bool TryFromString(
	string s,
	out Day result
)

Parameters

s  String
A string representation of a date, in YYYY-MM-DD or YYYYMMDD format with an optional '+' in front.
result  Day
When this method returns, contains the Day represented by s if the parsing succeeded, or the default Day if it failed.

Return Value

Boolean
true if the parsing succeeded, false if it failed.
Exceptions
ExceptionCondition
ArgumentNullExceptions is null.
Remarks

Both formats can optionally have a '+' in front - XML schema doesn't allow the '+', but ISO does.

See Also