init
TypeScriptstatic init(): NSDateComponentsSwift declarationinit()class · SDK 27.1
class NSDateComponentsstatic init(): NSDateComponentsSwift declarationinit()isValidDateIn(calendar: Calendar): booleanSwift declarationfunc isValidDate(in calendar: Calendar) -> BoolsetValue(value: number, unit: NSCalendar_Unit): voidSwift declarationfunc setValue(_ value: Int, forComponent unit: NSCalendar.Unit)value(unit: NSCalendar_Unit): numberSwift declarationfunc value(forComponent unit: NSCalendar.Unit) -> Intget calendar(): (Calendar) | nullSwift declarationvar calendar: Calendar? { get set }set calendar(value: (Calendar) | null)Swift declarationvar calendar: Calendar? { get set }get date(): (globalThis.Date) | nullSwift declarationvar date: Date? { get }get day(): numberSwift declarationvar day: Int { get set }set day(value: number)Swift declarationvar day: Int { get set }get dayOfYear(): numberSwift declarationvar dayOfYear: Int { get set }set dayOfYear(value: number)Swift declarationvar dayOfYear: Int { get set }get era(): numberSwift declarationvar era: Int { get set }set era(value: number)Swift declarationvar era: Int { get set }get hour(): numberSwift declarationvar hour: Int { get set }set hour(value: number)Swift declarationvar hour: Int { get set }get isLeapMonth(): booleanSwift declarationvar isLeapMonth: Bool { get set }set isLeapMonth(value: boolean)Swift declarationvar isLeapMonth: Bool { get set }get minute(): numberSwift declarationvar minute: Int { get set }set minute(value: number)Swift declarationvar minute: Int { get set }get month(): numberSwift declarationvar month: Int { get set }set month(value: number)Swift declarationvar month: Int { get set }get nanosecond(): numberSwift declarationvar nanosecond: Int { get set }set nanosecond(value: number)Swift declarationvar nanosecond: Int { get set }get quarter(): numberSwift declarationvar quarter: Int { get set }set quarter(value: number)Swift declarationvar quarter: Int { get set }get isRepeatedDay(): booleanSwift declarationvar isRepeatedDay: Bool { get set }set isRepeatedDay(value: boolean)Swift declarationvar isRepeatedDay: Bool { get set }get second(): numberSwift declarationvar second: Int { get set }set second(value: number)Swift declarationvar second: Int { get set }get timeZone(): (TimeZone) | nullSwift declarationvar timeZone: TimeZone? { get set }set timeZone(value: (TimeZone) | null)Swift declarationvar timeZone: TimeZone? { get set }get isValidDate(): booleanSwift declarationvar isValidDate: Bool { get }get weekOfMonth(): numberSwift declarationvar weekOfMonth: Int { get set }set weekOfMonth(value: number)Swift declarationvar weekOfMonth: Int { get set }get weekOfYear(): numberSwift declarationvar weekOfYear: Int { get set }set weekOfYear(value: number)Swift declarationvar weekOfYear: Int { get set }get weekday(): numberSwift declarationvar weekday: Int { get set }set weekday(value: number)Swift declarationvar weekday: Int { get set }get weekdayOrdinal(): numberSwift declarationvar weekdayOrdinal: Int { get set }set weekdayOrdinal(value: number)Swift declarationvar weekdayOrdinal: Int { get set }get year(): numberSwift declarationvar year: Int { get set }set year(value: number)Swift declarationvar year: Int { get set }get yearForWeekOfYear(): numberSwift declarationvar yearForWeekOfYear: Int { get set }set yearForWeekOfYear(value: number)Swift declarationvar yearForWeekOfYear: Int { get set }No declarations were skipped in this snapshot.