{"record":{"id":"22e84586a3353775","repo":"Humanizr/Humanizer","slug":"ordinal-date-profile-profile-profilename-uses","errorCode":null,"errorMessage":"Ordinal date profile '{profile.ProfileName}' uses MMM (abbreviated month) which is not supported when calendar month overrides are active. Only MMMM (full month name) substitution is supported.","messagePattern":"Ordinal date profile '(.+?)' uses MMM \\(abbreviated month\\) which is not supported when calendar month overrides are active\\. Only MMMM \\(full month name\\) substitution is supported\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Humanizer.SourceGenerators/Generators/ProfileCatalogs/OrdinalDateProfileCatalogInput.cs","lineNumber":191,"sourceCode":"                {\n                    \"PatternDateToOrdinalWordsConverter\" => \"new DefaultDateToOrdinalWordConverter()\",\n                    \"PatternDateOnlyToOrdinalWordsConverter\" => \"new DefaultDateOnlyToOrdinalWordConverter()\",\n                    _ => throw new InvalidOperationException($\"Unsupported default ordinal-date converter '{converterTypeName}'.\")\n                },\n                \"pattern\" => CreatePatternExpression(profile, converterTypeName),\n                _ => throw new InvalidOperationException($\"Unsupported ordinal date engine '{profile.Engine}'.\")\n            };\n\n        static string CreatePatternExpression(OrdinalDateProfileDefinition profile, string converterTypeName)\n        {\n            var pattern = GetRequiredString(profile.Root, \"pattern\");\n            var hasGregorianMonths = profile.Months.Length > 0;\n            var hasHijriMonths = profile.HijriMonths.Length > 0;\n            var hasAnyMonthOverride = hasGregorianMonths || hasHijriMonths;\n\n            if (hasAnyMonthOverride && ContainsAbbreviatedMonth(pattern))\n            {\n                throw new InvalidOperationException(\n                    $\"Ordinal date profile '{profile.ProfileName}' uses MMM (abbreviated month) \" +\n                    \"which is not supported when calendar month overrides are active. \" +\n                    \"Only MMMM (full month name) substitution is supported.\");\n            }\n\n            if (hasAnyMonthOverride)\n            {\n                var mmmmCount = CountUnescapedFullMonth(pattern);\n                if (mmmmCount == 0)\n                {\n                    throw new InvalidOperationException(\n                        $\"Ordinal date profile '{profile.ProfileName}' has calendar month overrides \" +\n                        \"but pattern does not contain an unescaped MMMM specifier.\");\n                }\n\n                if (mmmmCount > 1)\n                {\n                    throw new InvalidOperationException(","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/Humanizr/Humanizer/blob/ffc2b77c0f30d2fb176875841424379319d0ae9b/src/Humanizer.SourceGenerators/Generators/ProfileCatalogs/OrdinalDateProfileCatalogInput.cs#L173-L209","documentation":"Thrown during source generation by CreatePatternExpression when an ordinal-date profile has calendar month overrides (Gregorian or Hijri months defined) AND its pattern string contains an unescaped MMM (abbreviated month) specifier. The generator only knows how to substitute full month names (MMMM) from the calendar override; abbreviated months (MMM) are not supported in that mode.","triggerScenarios":"A locale YAML defines a calendar.months or calendar.hijriMonths sequence for the ordinal-date profile, and the pattern property contains 'MMM' (the .NET abbreviated-month format token). The generator detects this conflict and rejects it because it cannot inject abbreviated month names from the override list.","commonSituations":"A maintainer copies a date format pattern from another locale or feature that uses abbreviated months, while simultaneously adding calendar month overrides for full month names.","solutions":["Change the pattern to use MMMM (full month name) instead of MMM (abbreviated month) so the generator can substitute from the calendar override.","If you truly need abbreviated months, remove the calendar.months and calendar.hijriMonths overrides so the pattern relies on ICU-supplied month names.","Ensure the MMM is not inside a quoted literal section (e.g. 'dd \\'MMM\\' yyyy') — escape it properly if it is meant as a literal."],"exampleFix":"# locale YAML — before (conflict: month override + abbreviated month)\nordinalDate:\n  engine: pattern\n  pattern: \"dd MMM yyyy\"\ncalendar:\n  months:\n    - January\n    - February\n\n# after — use full month name\nordinalDate:\n  engine: pattern\n  pattern: \"dd MMMM yyyy\"\ncalendar:\n  months:\n    - January\n    - February","handlingStrategy":"validation","validationCode":"// Before building, if a locale YAML has calendar month overrides for\n// ordinal dates, verify the pattern uses MMMM (not MMM) for months.\n// MMM is unsupported when overrides are active.","typeGuard":null,"tryCatchPattern":null,"preventionTips":["When adding calendar.months or calendar.hijriMonths to a locale, ensure the ordinal-date pattern uses MMMM only.","If abbreviated months are needed, do not provide calendar month overrides.","Review the .NET date format string documentation for MMM vs MMMM semantics."],"tags":["source-generator","locale-yaml","ordinal-date","calendar","date-format","build-time"],"backgroundTag":null,"analyzedSha":"ffc2b77c0f30d2fb176875841424379319d0ae9b","analyzedAt":"2026-08-13T21:42:34.584Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}