A convenience class for working with FHIR instants in Python. More...
Public Member Functions | |
__init__ (self, Union[str, None] jsonval=None) | |
Public Member Functions inherited from fhirclient.models.fhirdate.FHIRDate | |
__setattr__ (self, prop, value) | |
with_json (cls, Union[str, list] jsonobj) | |
Initialize a date from an ISO date string. | |
with_json_and_owner (cls, Union[str, list] jsonobj, owner) | |
Added for compatibility reasons to FHIRElement; "owner" is discarded. | |
Union[str, None] | as_json (self) |
Returns the original JSON string used to create this instance. | |
Static Protected Member Functions | |
Any | _from_string (str value) |
Static Protected Member Functions inherited from fhirclient.models.fhirdate.FHIRDate | |
_parse_partial (str value, cls) | |
Handle partial dates like 1970 or 1980-12. | |
datetime.date | _parse_date (str value) |
datetime.datetime | _parse_datetime (str value) |
datetime.time | _parse_time (str value) |
str | _strip_leap_seconds (str value) |
Manually ignore leap seconds by clamping the seconds value to 59. | |
Static Protected Attributes | |
_REGEX | |
Private properties and methods #. | |
str | _FIELD |
Static Protected Attributes inherited from fhirclient.models.fhirdate.FHIRDate | |
_REGEX | |
Private properties and methods #. | |
str | _FIELD |
Additional Inherited Members | |
Public Attributes inherited from fhirclient.models.fhirdate.FHIRDate | |
date | |
origval | |
Protected Attributes inherited from fhirclient.models.fhirdate.FHIRDate | |
_FIELD | |
Properties inherited from fhirclient.models.fhirdate.FHIRDate | |
isostring = property | |
Returns a standardized ISO 8601 version of the Python representation of the FHIR JSON. | |
A convenience class for working with FHIR instants in Python.
http://hl7.org/fhir/R4/datatypes.html#instant
Converting to a Python representation does require some compromises:
If such compromise is not useful for you, avoid using the date
, datetime
, or isostring
properties and just use the as_json()
method in order to work with the original, exact string.
Public properties:
datetime
: datetime.datetime representing the JSON value (aware only)date
: backwards-compatibility alias for datetime
isostring
: an ISO 8601 string version of the above Python objectPublic methods:
as_json
: returns the original JSON used to construct the instance fhirclient.models.fhirinstant.FHIRInstant.__init__ | ( | self, | |
Union[str, None] | jsonval = None |
||
) |
Reimplemented from fhirclient.models.fhirdate.FHIRDate.
|
staticprotected |
Reimplemented from fhirclient.models.fhirdate.FHIRDate.
|
staticprotected |
|
staticprotected |
Private properties and methods #.