DateTime
public struct DateTime: DateAndTime
A date, optionally with time, as used in human communication.
If a time is specified there must be a timezone; defaults to the system reported local timezone.
-
The date.
Declaration
Swift
public var date: FHIRDate
-
The time.
Declaration
Swift
public var time: FHIRTime?
-
The timezone
Declaration
Swift
public var timeZone: TimeZone?
-
An optional id of the element.
Declaration
Swift
public var id: String?
-
The parent/owner of the receiver, if any. Used to dereference resources.
Declaration
Swift
public weak var _owner: FHIRAbstractBase?
-
Optional extensions of the element.
Declaration
Swift
public var extension_fhir: [Extension]?
-
This very date and time: a DateTime instance representing current date and time.
Declaration
Swift
public static var now: DateTime
-
Designated initializer, takes a date and optionally a time and a timezone.
If time is given but no timezone, the instance is assigned the local time zone.
Parameters
date
The date of the date-time
time
The time of the date-time
timeZone
The timezone
-
Uses
DateAndTimeParser
to initialize from a date-time string.If time is given but no timezone, the instance is assigned the local time zone.
Declaration
Swift
public init?(string: String)
Parameters
string
The string the date-time is parsed from
-
Declaration
Swift
public init(json: JSONType, owner: FHIRAbstractBase?, context: inout FHIRInstantiationContext)
Parameters
json
The value in its associated
JSONType
owner
Optional, the owning element
context
An in-out parameter for the instantiation context
-
Declaration
Swift
public func asJSON(errors: inout [FHIRValidationError]) -> JSONType
Parameters
errors
Errors encountered during serialization
Return Value
The FHIRJSON reperesentation of the receiver
-
Undocumented
Declaration
Swift
public struct DateTime: DateAndTime
-
Declaration
Swift
public var description: String
-
Declaration
Swift
public static func ==(lhs: DateTime, rhs: DateTime) -> Bool
Parameters
lhs
A value to compare.
rhs
Another value to compare.
-
Declaration
Swift
public static func <(lhs: DateTime, rhs: DateTime) -> Bool
Parameters
lhs
A value to compare.
rhs
Another value to compare.