talira

A complete date and time library for Elixir, with full time zone support

open sourceMITfree

Timex is a date and time library for Elixir by Paul Schoenfelder, with full time zone support through the tzdata package. It shifts dates and times by any unit, compares and diffs them, works with durations and intervals, and formats and parses with its own directives, strftime or relative ("3 minutes ago") formats. Its types stand in for Erlang's and Elixir's own, and the timex_ecto package adds Ecto types.

Problems it solves

  • convert a datetime between time zones in Elixir
  • format a date as 3 minutes ago in Phoenix
  • parse a date string with a custom format in Elixir
  • add days or hours to a DateTime in Elixir

Features

  • shift, compare and diff dates and times
  • full time zone support through tzdata
  • format and parse with Timex directives, strftime or relative time
  • durations and intervals
  • works on Elixir's Date, NaiveDateTime and DateTime

Alternatives

The same job

These do what Timex does.

  1. Tzdata The IANA time zone database for Elixir, kept up to date automatically

Compare Timex with the top 3