Click or drag to resize

StartOfYearFromString Method

Parses a string representation of a StartOfYear in --MM-DD format, the format used by XML Schema's gMonthDay type (based on ISO 8601).

Namespace: DegreeDays.Time
Assembly: DegreeDays (in DegreeDays.dll) Version: 1.4
Syntax
public static StartOfYear FromString(
	string startOfYearString
)

Parameters

startOfYearString  String
A string with format --MM-DD, where MM is a number between 01 and 12 (inclusive) representing the month of the year, and DD is a number between 01 and the number of days in the month MM (inclusive), the maximum being 28 for February.

Return Value

StartOfYear
A StartOfYear corresponding to the month-day combination represented by startOfYearString.
Exceptions
ExceptionCondition
ArgumentNullExceptionstartOfYearString is null.
FormatExceptionstartOfYearString has an invalid format (including if it represents an impossible month-day combination).
Remarks

Note that this method will not accept a string containing the time-zone information that is optionally allowed by XML Schema's gMonthDay type. It also will not accept "--02-29", since that month-day combination only makes sense on leap years, and StartOfYear is designed to be applicable to all years.

See Also