@@ -1547,7 +1547,7 @@ private static void GetDefaultYear(ref DateTimeResult result, scoped ref DateTim
1547
1547
result . flags |= ParseFlags . YearDefault ;
1548
1548
}
1549
1549
1550
- // Processing teriminal case: DS.DX_NN
1550
+ // Processing terminal case: DS.DX_NN
1551
1551
private static bool GetDayOfNN ( ref DateTimeResult result , scoped ref DateTimeStyles styles , scoped ref DateTimeRawInfo raw , DateTimeFormatInfo dtfi )
1552
1552
{
1553
1553
if ( ( result . flags & ParseFlags . HaveDate ) != 0 )
@@ -1589,7 +1589,7 @@ private static bool GetDayOfNN(ref DateTimeResult result, scoped ref DateTimeSty
1589
1589
return false ;
1590
1590
}
1591
1591
1592
- // Processing teriminal case: DS.DX_NNN
1592
+ // Processing terminal case: DS.DX_NNN
1593
1593
private static bool GetDayOfNNN ( ref DateTimeResult result , scoped ref DateTimeRawInfo raw , DateTimeFormatInfo dtfi )
1594
1594
{
1595
1595
if ( ( result . flags & ParseFlags . HaveDate ) != 0 )
@@ -5183,7 +5183,7 @@ private static Exception GetDateTimeParseException(scoped ref DateTimeResult res
5183
5183
case ParseFailureKind . Format_BadDatePattern :
5184
5184
return new FormatException ( SR . Format ( SR . Format_BadDatePattern , result . failureMessageFormatArgument ) ) ;
5185
5185
case ParseFailureKind . Format_BadDateTime :
5186
- return new FormatException ( SR . Format ( SR . Format_BadDateTime , result . failureMessageFormatArgument ) ) ;
5186
+ return new FormatException ( SR . Format ( SR . Format_BadDateTime , new string ( result . originalDateTimeString ) ) ) ;
5187
5187
case ParseFailureKind . Format_BadDateTimeCalendar :
5188
5188
return new FormatException ( SR . Format ( SR . Format_BadDateTimeCalendar , new string ( result . originalDateTimeString ) , result . calendar ) ) ;
5189
5189
case ParseFailureKind . Format_BadDayOfWeek :
@@ -6124,7 +6124,6 @@ internal void SetBadFormatSpecifierFailure(ReadOnlySpan<char> failedFormatSpecif
6124
6124
internal void SetBadDateTimeFailure ( )
6125
6125
{
6126
6126
this . failure = ParseFailureKind . Format_BadDateTime ;
6127
- this . failureMessageFormatArgument = null ;
6128
6127
}
6129
6128
6130
6129
internal void SetFailure ( ParseFailureKind failure )
0 commit comments