Instant
public struct InstantUndocumented
- 
                  
                  Constant for the 1970-01-01T00:00:00Z epoch instant. DeclarationSwift public static var epoch: Instant { get }
- 
                  
                  The minimum supported Instant, ‘-1000_000_000-01-01T00:00Z’. DeclarationSwift public static var min: Instant { get }
- 
                  
                  The maximum supported Instant, ‘1000_000_000-12-31T23:59:59.999999999Z’. DeclarationSwift public static var max: Instant { get }
- 
                  
                  Gets the number of seconds from the Java epoch of 1970-01-01T00:00:00Z. DeclarationSwift public var second: Int64 { get set }
- 
                  
                  Gets the number of nanoseconds, later along the time-line, from the start of the second. DeclarationSwift public var nano: Int { get set }
- 
                  
                  Converts this instant to the number of milliseconds from the epoch of 1970-01-01T00:00:00Z. DeclarationSwift public var epochMilli: Int64 { get }
- 
                  
                  Obtains an instance of Instant from a text string such as 2007-12-03T10:15:30.00Z .If the input text and date format are mismatched, returns nil. ParameterstextThe text to parse. clockThe Clock instance. Return ValueThe parsed instant. 
- 
                  
                  Obtains an instance of Instant from a text string such as 2007-12-03T10:15:30.00Z .If the input text and date format are mismatched, returns nil. DeclarationSwift public static func parse(_ text: String, timeZone: TimeZone) -> Instant?ParameterstextThe text to parse. timeZoneThe TimeZone instance. Return ValueThe parsed instant. 
- 
                  
                  Obtains an instance of Instant from a text string using a specific formatter. If the input text and date format are mismatched, returns nil. DeclarationParameterstextThe text to parse. formatterThe formatter to parse. clockThe Clock instance. Return ValueThe parsed instant. 
- 
                  
                  Obtains an instance of Instant from a text string using a specific formatter. If the input text and date format are mismatched, returns nil. DeclarationSwift public static func parse(_ text: String, formatter: DateFormatter, timeZone: TimeZone) -> Instant?ParameterstextThe text to parse. formatterThe formatter to parse. timeZoneThe TimeZone instance. Return ValueThe parsed instant. 
- 
                  
                  Combines this instant with a time-zone to create a ZonedDateTime. DeclarationSwift public func toZone(clock: Clock = Clock.current) -> ZonedDateTime
- 
                  
                  Returns a copy of this instant with the specified field set to a new value. DeclarationSwift public func with(component: Component, newValue: Int64) -> InstantParameterscomponentThe field to set in the result. newValueThe new value of the field in the result. Return ValueAn Instant based on this with the specified field set. 
- 
                  
                  Returns a copy of this Instant with the second value altered. DeclarationSwift public func with(second: Int64) -> InstantReturn ValueAn Instant based on this with the specified field set. 
- 
                  
                  Returns a copy of this Instant with the nano-of-second value altered. DeclarationSwift public func with(nano: Int64) -> InstantReturn ValueAn Instant based on this with the specified field set. 
- 
                  
                  Returns a copy of this instant with the specified amount added. - Results: An Instant based on this instant with the specified amount added.
 DeclarationSwift public func plus(component: Component, newValue: Int64) -> InstantParameterscomponentThe unit of the amount to add. newValueThe amount of the unit to add to the result. 
- 
                  
                  Returns a copy of this instant with the specified duration in seconds added. - Results: An Instant based on this instant with the specified amount added.
 DeclarationSwift public func plus(second: Int64) -> Instant
- 
                  
                  Returns a copy of this instant with the specified duration in milliseconds added. - Results: An Instant based on this instant with the specified amount added.
 DeclarationSwift public func plus(milli: Int64) -> Instant
- 
                  
                  Returns a copy of this instant with the specified duration in nanoseconds added. - Results: An Instant based on this instant with the specified amount added.
 DeclarationSwift public func plus(nano: Int64) -> Instant
- 
                  
                  Returns a copy of this instant with the specified duration added. - Results: An Instant based on this instant with the specified amount added.
 DeclarationSwift public func plus(second: Int64, nano: Int64) -> InstantParameterssecondThe amount of the second field to add to the result. nanoThe amount of the nano-of-second field to add to the result. 
- 
                  
                  Returns a copy of this instant with the specified amount subtracted. - Results: An Instant based on this instant with the specified amount subtracted.
 DeclarationSwift public func minus(component: Component, newValue: Int64) -> InstantParameterscomponentThe unit of the amount to subtract. newValueThe amount of the unit to subtract to the result. 
- 
                  
                  Returns a copy of this instant with the specified duration in seconds subtracted. - Results: An Instant based on this instant with the specified amount subtracted.
 DeclarationSwift public func minus(second: Int64) -> Instant
- 
                  
                  Returns a copy of this instant with the specified duration in milliseconds subtracted. - Results: An Instant based on this instant with the specified amount subtracted.
 DeclarationSwift public func minus(milli: Int64) -> Instant
- 
                  
                  Returns a copy of this instant with the specified duration in nanoseconds subtracted. - Results: An Instant based on this instant with the specified amount subtracted.
 DeclarationSwift public func minus(nano: Int64) -> Instant
- 
                  
                  Returns a copy of this instant with the specified duration subtracted. - Results: An Instant based on this instant with the specified amount subtracted.
 DeclarationSwift public func minus(second: Int64, nano: Int64) -> InstantParameterssecondThe amount of the second field to subtract to the result. nanoThe amount of the nano-of-second field to subtract to the result. 
- 
                  
                  Calculates the amount of time until another instant in terms of the specified unit. DeclarationSwift public func until(endInstant: Instant, component: UntilComponent) -> Int64ParametersendInstantThe end date, exclusive, which is converted to an Instant. componentThe unit to measure the amount in. Return ValueThe amount of time between this instant and the end instant. 
- 
                  
                  Undocumented DeclarationSwift public static func + (lhs: Instant, rhs: Instant) -> Instant
- 
                  
                  Undocumented DeclarationSwift public static func += (lhs: inout Instant, rhs: Instant)
- 
                  
                  Undocumented DeclarationSwift public static func - (lhs: Instant, rhs: Instant) -> Instant
- 
                  
                  Undocumented DeclarationSwift public static func -= (lhs: inout Instant, rhs: Instant)
- 
                  
                  Creates an instant from an instance of Date. DeclarationSwift public init(_ date: Date = Date())
- 
                  
                  Creates an instance of Instant using seconds from the epoch of 1970-01-01T00:00:00Z. DeclarationSwift public init(epochSecond: Int64, nano: Int64 = 0)
- 
                  
                  Creates an instance of Instant using milliseconds from the epoch of 1970-01-01T00:00:00Z. DeclarationSwift public init(epochMilli: Int64)
- 
                  
                  Returns a Boolean value indicating whether the value of the first argument is less than that of the second argument. DeclarationSwift public static func < (lhs: Instant, rhs: Instant) -> Bool
- 
                  
                  Returns a Boolean value indicating whether the value of the first argument is greater than that of the second argument. DeclarationSwift public static func > (lhs: Instant, rhs: Instant) -> Bool
- 
                  
                  Returns a Boolean value indicating whether the value of the first argument is less than or equal to that of the second argument. DeclarationSwift public static func <= (lhs: Instant, rhs: Instant) -> Bool
- 
                  
                  Returns a Boolean value indicating whether the value of the first argument is greater than or equal to that of the second argument. DeclarationSwift public static func >= (lhs: Instant, rhs: Instant) -> Bool
- 
                  
                  The hash value. Hash values are not guaranteed to be equal across different executions of your program. Do not save hash values to use during a future execution. DeclarationSwift public var hashValue: Int { get }
- 
                  
                  Returns a Boolean value indicating whether two values are equal. DeclarationSwift public static func == (lhs: Instant, rhs: Instant) -> Bool
- 
                  
                  A textual representation of this instance. DeclarationSwift public var description: String { get }
- 
                  
                  A textual representation of this instance, suitable for debugging. DeclarationSwift public var debugDescription: String { get }
- 
                  
                  The custom mirror for this instance. If this type has value semantics, the mirror should be unaffected by subsequent mutations of the instance. DeclarationSwift public var customMirror: Mirror { get }
- 
                  
                  Returns the custom playground description for this instance. If this type has value semantics, the instance returned should be unaffected by subsequent mutations if possible. DeclarationSwift public var playgroundDescription: Any { get }
- 
                  
                  Creates a new instance by decoding from the given decoder. This initializer throws an error if reading from the decoder fails, or if the data read is corrupted or otherwise invalid. DeclarationSwift public init(from decoder: Decoder) throwsParametersdecoderThe decoder to read data from. 
- 
                  
                  Encodes this value into the given encoder. If the value fails to encode anything, encoderwill encode an empty keyed container in its place.This function throws an error if any values are invalid for the given encoder’s format. DeclarationSwift public func encode(to encoder: Encoder) throwsParametersencoderThe encoder to write data to. 
 View on GitHub
View on GitHub Instant Structure Reference
        Instant Structure Reference