View Source FatUtils.DateTime (FatEcto v1.0.0)

Provides utility functions for parsing and converting date-time values.

This module handles parsing of date-time values from integers (Unix timestamps) and binary strings (ISO 8601 format).

Summary

Functions

Parses a date-time value from an integer (Unix timestamp) or a binary string (ISO 8601 format).

Parses a date-time value from an integer (Unix timestamp) or a binary string (ISO 8601 format).

Functions

parse(dtu)

@spec parse(any()) :: :error | {:ok, DateTime.t()}

Parses a date-time value from an integer (Unix timestamp) or a binary string (ISO 8601 format).

Returns {:ok, DateTime.t()} on success or :error on failure.

parse!(dtu)

@spec parse!(any()) :: nil | DateTime.t()

Parses a date-time value from an integer (Unix timestamp) or a binary string (ISO 8601 format).

Returns a DateTime.t() on success or nil on failure.