Skip to content

mwhitworth/relative_datetime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RelativeDateTime

Parses relative datetimes, given an input string and datetime:

iex> {:ok, datetime} = RelativeDateTime.parse("3 days ago", ~U[2018-01-01 00:00:00Z])
{:ok, ~U[2018-12-29 00:00:00Z]}

Installation

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

def deps do
  [
    {:relative_datetime, "~> 0.0.0"}
  ]
end

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

About

Relative datetime parser for Elixir

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages