The new Calendar Types in Elixir 1.3
summary
Elixir 1.3 introduces concrete structs for Date Time Time and NaiveDateTime with a calendar field to support alternate calendars and microsecond storage as a two element tuple showing microsecond value and significant precision. Conversions require explicit tagging so transforming a NaiveDateTime to UTC produces a proper DateTime. Integration examples use the calendar library plus tz data libraries and Ecto with Postgres composite types so timestamps keep zone info for correct comparisons.
AI-written summary · about
chapters (12)
- 0:00Start
- 0:01Elixir & Phoenix
- 0:25Calendar types in Elixir 1.3
- 1:14What is a type?
- 1:27Why have types?
- 2:02Explicit data
- 5:01Different units of time and date
- 13:13The structs built into Elixir 1.3
- 20:52Getting the time zone of a user
- 22:37Persistence in Ecto
- 24:20You want to select a type that fits the data
- 29:03Questions








