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.3
Syntaxpublic static bool TryFromString(
string s,
out Day result
)
Public Shared Function TryFromString (
s As String,
<OutAttribute> ByRef result As Day
) As Boolean
Parameters
- s
- Type: SystemString
A string representation of a date, in YYYY-MM-DD or
YYYYMMDD format with an optional '+' in front. - result
- Type: DegreeDays.TimeDay
When this method returns, contains the Day
represented by s if the parsing succeeded, or the
default Day if it failed.
Return Value
Type:
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