Data Model Libraries
    Preparing search index...

    FHIR Primitive DateTimeType implementation supporting Luxon DateTime object

    Luxon

    interface DateTimeTypeImpl {
        setValueAsDateTime: (dt: undefined | DateTime<boolean>) => this;
        setValueAsInstant: (dt: undefined | DateTime<boolean>) => this;
        getValueAsDateTime: (
            opts?: DateTimeUtil.DateTimeOpts,
        ) => undefined | DateTime<boolean>;
        getValueAsDateTimeUTC: () => undefined | DateTime<boolean>;
        setValueAsYear: (dt: undefined | DateTime<boolean>) => this;
        setValueAsYearMonth: (dt: undefined | DateTime<boolean>) => this;
        setValueAsDateOnly: (dt: undefined | DateTime<boolean>) => this;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    setValueAsDateTime: (dt: undefined | DateTime<boolean>) => this

    Sets the PrimitiveType's value of the provided dt argument as an ISO datetime string excluding milliseconds from the format if they are 0

    Type Declaration

      • (dt: undefined | DateTime<boolean>): this
      • Parameters

        • dt: undefined | DateTime<boolean>

          DateTime object from which to obtain a string value

        Returns this

        this

    InvalidDateTimeError for an invalid dt argument

    setValueAsInstant: (dt: undefined | DateTime<boolean>) => this

    Sets the PrimitiveType's value of the provided dt argument as an ISO datetime string including milliseconds

    Type Declaration

      • (dt: undefined | DateTime<boolean>): this
      • Parameters

        • dt: undefined | DateTime<boolean>

          DateTime object from which to obtain a string value

        Returns this

        this

    InvalidDateTimeError for an invalid dt argument

    getValueAsDateTime: (
        opts?: DateTimeUtil.DateTimeOpts,
    ) => undefined | DateTime<boolean>

    Returns a Luxon DateTime object for the PrimitiveType's getValue().

    Type Declaration

      • (opts?: DateTimeUtil.DateTimeOpts): undefined | DateTime<boolean>
      • Parameters

        • Optionalopts: DateTimeUtil.DateTimeOpts

          Optional DateTime options object to affect the creation of the DateTime instance

        Returns undefined | DateTime<boolean>

        an instance of a DateTime object

    Uses DateTime.fromISO() static method to create a DateTime object.

    InvalidDateTimeError if the instantiated DataTime object is invalid

    getValueAsDateTimeUTC: () => undefined | DateTime<boolean>

    Returns a Luxon DateTime object having the UTC time zone for the PrimitiveType's getValue().

    Type Declaration

      • (): undefined | DateTime<boolean>
      • Returns undefined | DateTime<boolean>

        an instance of a DateTime object having the UTC time zone

    Uses DateTime.fromISO() static method to create a DateTime object.

    InvalidDateTimeError if the instantiated DataTime object is invalid

    setValueAsYear: (dt: undefined | DateTime<boolean>) => this

    Sets the PrimitiveType's value of the provided dt argument as 'YYYY'

    Type Declaration

      • (dt: undefined | DateTime<boolean>): this
      • Parameters

        • dt: undefined | DateTime<boolean>

          DateTime object from which to obtain a string value

        Returns this

        this

    InvalidDateTimeError for an invalid dt argument

    setValueAsYearMonth: (dt: undefined | DateTime<boolean>) => this

    Sets the PrimitiveType's value of the provided dt argument as 'YYYY-MM'

    Type Declaration

      • (dt: undefined | DateTime<boolean>): this
      • Parameters

        • dt: undefined | DateTime<boolean>

          DateTime object from which to obtain a string value

        Returns this

        this

    InvalidDateTimeError for an invalid dt argument

    setValueAsDateOnly: (dt: undefined | DateTime<boolean>) => this

    Sets the PrimitiveType's value of the provided dt argument as 'YYYY-MM-DD'

    Type Declaration

      • (dt: undefined | DateTime<boolean>): this
      • Parameters

        • dt: undefined | DateTime<boolean>

          DateTime object from which to obtain a string value

        Returns this

        this

    InvalidDateTimeError for an invalid dt argument