RelativeTime

Syntax

It is possible to use relative time in 2 ways:

  1. give a more or less complete datetime string, which will simply be parsed
  2. give a relative time expression, which can reference the current time (now) and other so called “markers”, which can be defined by the application

Data types

Operators

Installation

If available in Hex, the package can be installed by adding relative_time to your list of dependencies in mix.exs:

def deps do
  [
    {:relative_time, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/relative_time.