Foundation · IOS API REFERENCE
DateComponentsFormatter
class · iOS 8.0+ · SDK 27.1
class DateComponentsFormatter
Members (29)
static · iOS 8.0+localizedString
TypeScriptstatic localizedString(components: DateComponents, unitsStyle: DateComponentsFormatter_UnitsStyle): (string) | null
Swift declarationclass func localizedString(from components: DateComponents, unitsStyle: DateComponentsFormatter.UnitsStyle) -> String?
method · iOS 8.0+getObjectValue
TypeScriptgetObjectValue(string: string): { $ret: boolean; $out: { "obj": (unknown) | null; "error": (NSString) | null } }
Swift declarationfunc getObjectValue(_ obj: AutoreleasingUnsafeMutablePointer<AnyObject?>?, for string: String, errorDescription error: AutoreleasingUnsafeMutablePointer<NSString?>?) -> Bool
Omit the output parameters from the call. The result contains $ret and $out, with obj, error inside $out.
initinit
TypeScriptstatic init(): DateComponentsFormatter
Swift declarationinit()
method · iOS 8.0+string
TypeScriptstringFor(obj?: (unknown) | null): (string) | null
Swift declarationfunc string(for obj: Any?) -> String?
method · iOS 8.0+string
TypeScriptstringFromTo(startDate: globalThis.Date, endDate: globalThis.Date): (string) | null
Swift declarationfunc string(from startDate: Date, to endDate: Date) -> String?
method · iOS 8.0+string
TypeScriptstringFrom(components: DateComponents): (string) | null
Swift declarationfunc string(from components: DateComponents) -> String?
method · iOS 8.0+string
TypeScriptstringFrom65180(ti: number): (string) | null
Swift declarationfunc string(from ti: TimeInterval) -> String?
get · iOS 8.0+allowedUnits
TypeScriptget allowedUnits(): NSCalendar_Unit
Swift declarationvar allowedUnits: NSCalendar.Unit { get set }
set · iOS 8.0+allowedUnits
TypeScriptset allowedUnits(value: NSCalendar_Unit)
Swift declarationvar allowedUnits: NSCalendar.Unit { get set }
get · iOS 8.0+allowsFractionalUnits
TypeScriptget allowsFractionalUnits(): boolean
Swift declarationvar allowsFractionalUnits: Bool { get set }
set · iOS 8.0+allowsFractionalUnits
TypeScriptset allowsFractionalUnits(value: boolean)
Swift declarationvar allowsFractionalUnits: Bool { get set }
get · iOS 8.0+calendar
TypeScriptget calendar(): (Calendar) | null
Swift declarationvar calendar: Calendar? { get set }
set · iOS 8.0+calendar
TypeScriptset calendar(value: (Calendar) | null)
Swift declarationvar calendar: Calendar? { get set }
get · iOS 8.0+collapsesLargestUnit
TypeScriptget collapsesLargestUnit(): boolean
Swift declarationvar collapsesLargestUnit: Bool { get set }
set · iOS 8.0+collapsesLargestUnit
TypeScriptset collapsesLargestUnit(value: boolean)
Swift declarationvar collapsesLargestUnit: Bool { get set }
get · iOS 8.0+formattingContext
TypeScriptget formattingContext(): Formatter_Context
Swift declarationvar formattingContext: Formatter.Context { get set }
set · iOS 8.0+formattingContext
TypeScriptset formattingContext(value: Formatter_Context)
Swift declarationvar formattingContext: Formatter.Context { get set }
get · iOS 8.0+includesApproximationPhrase
TypeScriptget includesApproximationPhrase(): boolean
Swift declarationvar includesApproximationPhrase: Bool { get set }
set · iOS 8.0+includesApproximationPhrase
TypeScriptset includesApproximationPhrase(value: boolean)
Swift declarationvar includesApproximationPhrase: Bool { get set }
get · iOS 8.0+includesTimeRemainingPhrase
TypeScriptget includesTimeRemainingPhrase(): boolean
Swift declarationvar includesTimeRemainingPhrase: Bool { get set }
set · iOS 8.0+includesTimeRemainingPhrase
TypeScriptset includesTimeRemainingPhrase(value: boolean)
Swift declarationvar includesTimeRemainingPhrase: Bool { get set }
get · iOS 8.0+maximumUnitCount
TypeScriptget maximumUnitCount(): number
Swift declarationvar maximumUnitCount: Int { get set }
set · iOS 8.0+maximumUnitCount
TypeScriptset maximumUnitCount(value: number)
Swift declarationvar maximumUnitCount: Int { get set }
get · iOS 11.0+referenceDate
TypeScriptget referenceDate(): (globalThis.Date) | null
Swift declarationvar referenceDate: Date? { get set }
set · iOS 11.0+referenceDate
TypeScriptset referenceDate(value: (globalThis.Date) | null)
Swift declarationvar referenceDate: Date? { get set }
get · iOS 8.0+unitsStyle
TypeScriptget unitsStyle(): DateComponentsFormatter_UnitsStyle
Swift declarationvar unitsStyle: DateComponentsFormatter.UnitsStyle { get set }
set · iOS 8.0+unitsStyle
TypeScriptset unitsStyle(value: DateComponentsFormatter_UnitsStyle)
Swift declarationvar unitsStyle: DateComponentsFormatter.UnitsStyle { get set }
get · iOS 8.0+zeroFormattingBehavior
TypeScriptget zeroFormattingBehavior(): DateComponentsFormatter_ZeroFormattingBehavior
Swift declarationvar zeroFormattingBehavior: DateComponentsFormatter.ZeroFormattingBehavior { get set }
set · iOS 8.0+zeroFormattingBehavior
TypeScriptset zeroFormattingBehavior(value: DateComponentsFormatter_ZeroFormattingBehavior)
Swift declarationvar zeroFormattingBehavior: DateComponentsFormatter.ZeroFormattingBehavior { get set }
Skipped declarations
No declarations were skipped in this snapshot.
All Foundation types →