Returns a new date object that is set to a given number of seconds relative to the receiver.
- iOS 2.0–4.0Deprecated
- macOS 10.0–10.6Deprecated
- Mac Catalyst 13.0–13.0Deprecated
- tvOS 9.0–9.0Deprecated
- watchOS 2.0–2.0Deprecated
The number of seconds to add to the receiver. Use a negative value for seconds to have the returned object specify a date before the receiver.
NSDate object that is set to
seconds seconds relative to the receiver. The date returned might have a representation different from the receiver’s.
class func date(with: String) -> Any
Creates and returns a date object with a date and time value specified by a given string in the international string representation format (
YYYY-MM-DD HH:MM:SS ±HHMM).
Returns a date object initialized with a date and time value specified by a given string in the international string representation format.
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.Learn more about using Apple's beta software