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
dateThe date of the date-time
timeThe time of the date-time
timeZoneThe timezone
-
Uses
DateAndTimeParserto 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
stringThe string the date-time is parsed from
-
Declaration
Swift
public init(json: JSONType, owner: FHIRAbstractBase?, context: inout FHIRInstantiationContext)Parameters
jsonThe value in its associated
JSONTypeownerOptional, the owning element
contextAn in-out parameter for the instantiation context
-
Declaration
Swift
public func asJSON(errors: inout [FHIRValidationError]) -> JSONTypeParameters
errorsErrors 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) -> BoolParameters
lhsA value to compare.
rhsAnother value to compare.
-
Declaration
Swift
public static func <(lhs: DateTime, rhs: DateTime) -> BoolParameters
lhsA value to compare.
rhsAnother value to compare.
View on GitHub
Install in Dash
DateTime Struct Reference