DateFormatter
class DateFormatter
class DateFormatter
import Foundation
class Formatter
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol NSCoding
The NSCoding
protocol declares the two methods that a class must implement so that instances of that class can be encoded and decoded. This capability provides the basis for archiving (where objects and other structures are stored on disk) and distribution (where objects are copied to different address spaces).
protocol NSCopying
The NSCopying
protocol declares a method for providing functional copies of an object. The exact meaning of “copy” can vary from class to class, but a copy must be a functionally independent object with values identical to the original at the time the copy was made.
protocol NSObjectProtocol : AnyObject
The NSObjectProtocol
groups methods that are fundamental to all Foundation objects.
protocol Sendable
override init()
required init?(coder: NSCoder)
class func dateFormat(fromTemplate tmplate: String, options opts: Int, locale: Locale?) -> String?
class func localizedString(from date: Date, dateStyle dstyle: DateFormatter.Style, timeStyle tstyle: DateFormatter.Style) -> String
var amSymbol: String { get set }
var calendar: Calendar! { get set }
var dateFormat: String! { get set }
var dateStyle: DateFormatter.Style { get set }
var defaultDate: Date? { get set }
var doesRelativeDateFormatting: Bool { get set }
var eraSymbols: [String] { get set }
var generatesCalendarDates: Bool { get set }
var gregorianStartDate: Date? { get set }
var isLenient: Bool { get set }
var locale: Locale! { get set }
var longEraSymbols: [String] { get set }
var monthSymbols: [String] { get set }
var pmSymbol: String { get set }
var quarterSymbols: [String] { get set }
var shortMonthSymbols: [String] { get set }
var shortQuarterSymbols: [String] { get set }
var shortStandaloneMonthSymbols: [String] { get set }
var shortStandaloneQuarterSymbols: [String] { get set }
var shortStandaloneWeekdaySymbols: [String] { get set }
var shortWeekdaySymbols: [String] { get set }
var standaloneMonthSymbols: [String] { get set }
var standaloneQuarterSymbols: [String] { get set }
var standaloneWeekdaySymbols: [String] { get set }
var timeStyle: DateFormatter.Style { get set }
var timeZone: TimeZone! { get set }
var twoDigitStartDate: Date? { get set }
var veryShortMonthSymbols: [String] { get set }
var veryShortStandaloneMonthSymbols: [String] { get set }
var veryShortStandaloneWeekdaySymbols: [String] { get set }
var veryShortWeekdaySymbols: [String] { get set }
var weekdaySymbols: [String] { get set }
override func copy(with zone: NSZone? = nil) -> Any
func date(from string: String) -> Date?
func setLocalizedDateFormatFromTemplate(_ dateFormatTemplate: String)
override func string(for obj: Any) -> String?
func string(from date: Date) -> String
enum Style