CPCCalendarUnitSymbol
public protocol CPCCalendarUnitSymbol
Calendar unit that has a localizable symbol in addition to an integer value.
-
Get a localized name of a calendar unit.
Declaration
Swift
func symbol(style: Style, standalone: Bool) -> String
Parameters
style
Style of returned value.
standalone
true
indicates the intention of using the returned value in standalone context, e.g. as unit’s label.Return Value
Localized symbol representing this calendar unit with requested style and context.
-
Style
Extension methodSee also
CPCCalendarUnitSymbolStyle
Declaration
Swift
public typealias Style = CPCCalendarUnitSymbolStyle
-
symbol()
Extension methodGet a localized name of a calendar unit.
Declaration
Swift
public func symbol() -> String
Return Value
Localized symbol with default style.
-
symbol(standalone:)
Extension methodGet a localized name of a calendar unit.
Declaration
Swift
func symbol(standalone: Bool) -> String
Parameters
standalone
true
indicates the intention of using the returned value in standalone context, e.g. as unit’s label.Return Value
Localized symbol with default style for requested context.
-
symbol(style:)
Extension methodGet a localized name of a calendar unit.
Declaration
Swift
func symbol(style: Style) -> String
Parameters
style
Style of returned value.
Return Value
Localized symbol for requested style.