ex_l7 v0.3.0 ExL7.Date

Helper functions for HL7 date times

Summary

Functions

Converts an HL7 specified date to a recognizable date format

Formats a date time based on a given Timex date time format

Returns the current UTC date time in HL7 format (YYYYMMDDHHMMSS+0000)

Returns the current date time in a specified timezone in HL7 format (YYYYMMDDHHMMSS+0600)

Functions

convert(datetime, timezone \\ "UTC")

Converts an HL7 specified date to a recognizable date format

Parameters

  • datetime: HL7 string that represents a date time.
  • timezone: Timezone that the given date time is in.
format(datetime, output_format)

Formats a date time based on a given Timex date time format.

Formatting Options

For formatting options, check out Timex.DateTime.Formatters.

Parameters

  • datetime: Given date time to format.
  • output_format: Format string
get_current_datetime()

Returns the current UTC date time in HL7 format (YYYYMMDDHHMMSS+0000)

get_current_datetime(timezone)

Returns the current date time in a specified timezone in HL7 format (YYYYMMDDHHMMSS+0600)

Parameters

  • timezone: Timezone to create the date time in