relatedGregorian(minimumLength:)
Returns a custom format style that portrays the year of a non-Gregorian calendar system in the corresponding Gregorian year.
Declaration
static func relatedGregorian(minimumLength: Int = 1) -> Date.FormatStyle.Symbol.YearParameters
- minimumLength:
The minimum length to display the full year.
Return Value
A custom year format style that portrays the year of the calendar system with the provided minimum length.
Discussion
For non-Gregorian calendars, output corresponds to the extended Gregorian year in which the calendar’s year begins. The default length is the minimum needed to show the full year.