Commandex.Type.NaiveDateTime (Commandex v0.6.0)

Copy Markdown View Source

Casts values to naive datetimes.

Accepts a NaiveDateTime, a DateTime, or an ISO 8601 string. A string can omit the seconds, such as "2026-01-31T10:30". A DateTime is moved to UTC first, and an offset in a string is ignored.

This module keeps the microseconds as given. The :naive_datetime type drops them and the :naive_datetime_usec type sets their precision to 6 digits.

Summary

Types

t()

@type t() :: NaiveDateTime.t()