Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@ internal string InternalGetMonthName(int month, MonthNameStyles style, bool abbr
/// Retrieve the array which contains the month names in genitive form.
/// If this culture does not use the genitive form, the normal month name is returned.
/// </summary>
private string[] InternalGetGenitiveMonthNames(bool abbreviated)
internal string[] InternalGetGenitiveMonthNames(bool abbreviated)
{
if (abbreviated)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3353,7 +3353,7 @@ private static bool MatchAbbreviatedMonthName(ref __DTString str, DateTimeFormat
// Search genitive form.
if ((dtfi.FormatFlags & DateTimeFormatFlags.UseGenitiveMonth) != 0)
{
int tempResult = str.MatchLongestWords(dtfi.AbbreviatedMonthGenitiveNames, ref maxMatchStrLen);
int tempResult = str.MatchLongestWords(dtfi.InternalGetGenitiveMonthNames(abbreviated: true), ref maxMatchStrLen);

// We found a longer match in the genitive month name. Use this as the result.
// tempResult + 1 should be the month value.
Expand Down Expand Up @@ -3453,7 +3453,7 @@ private static bool MatchMonthName(ref __DTString str, DateTimeFormatInfo dtfi,
// Search genitive form.
if ((dtfi.FormatFlags & DateTimeFormatFlags.UseGenitiveMonth) != 0)
{
int tempResult = str.MatchLongestWords(dtfi.MonthGenitiveNames, ref maxMatchStrLen);
int tempResult = str.MatchLongestWords(dtfi.InternalGetGenitiveMonthNames(abbreviated: false), ref maxMatchStrLen);
// We found a longer match in the genitive month name. Use this as the result.
// The result from MatchLongestWords is 0 ~ length of word array.
// So we increment the result by one to become the month value.
Expand Down