Skip to content

Commit a29bef5

Browse files
authored
Merge pull request #8579 from michal-ciechan/patch-1
Update DateOnly - Add Remarks
2 parents 9e898fe + a4bb7df commit a29bef5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

xml/System/DateOnly.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,15 @@
939939
<summary>Converts the specified string representation of a date to its <see cref="T:System.DateOnly" /> equivalent using the specified format.
940940
The format of the string representation must match the specified format exactly or an exception is thrown.</summary>
941941
<returns>An object that is equivalent to the date contained in <paramref name="s" />, as specified by format.</returns>
942-
<remarks>To be added.</remarks>
942+
<remarks>
943+
<format type="text/markdown"><![CDATA[
944+
## Remarks
945+
The <xref:System.DateOnly.ParseExact%28System.String%2CSystem.String%29> method parses the string representation of a date, which must be in the format defined by the `format` parameter. It also requires that the \<Date> element of the string representation of a date appear in the order specified by `format`, and that `s` have no white space other than that permitted by `format`.
946+
The `format` parameter is a string that contains either a single standard format specifier, or one or more custom format specifiers that define the required format of `s`. For details about valid formatting codes, see [Standard Date and Time Format Strings](/dotnet/standard/base-types/standard-date-and-time-format-strings) or [Custom Date and Time Format Strings](/dotnet/standard/base-types/custom-date-and-time-format-strings).
947+
> [!NOTE]
948+
> If `format` is a custom format pattern that does not include date separators (such as "yyyyMMdd"), use the widest form of each custom format specifier. For example, if you want to specify months in the format pattern, specify the wider form, "MM", instead of the narrower form, "M".
949+
]]></format>
950+
</remarks>
943951
<exception cref="T:System.ArgumentNullException">
944952
<paramref name="s" /> is <see langword="null" />.</exception>
945953
<exception cref="T:System.FormatException">

0 commit comments

Comments
 (0)