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.TimeAssembly: DegreeDays (in DegreeDays.dll) Version: 1.4
Syntax public static bool TryFromString(
string s,
out Day result
)
Public Shared Function TryFromString (
s As String,
<OutAttribute> ByRef result As Day
) As Boolean
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
Booleantrue if the parsing succeeded,
false if it failed.
Exceptions Remarks
Both formats can optionally have a '+' in front - XML schema doesn't allow the
'+', but ISO does.
See Also