datex v1.0.0 Datex

Human readable simple date and time library.

It works with standard date and time as well as elixir date, time formats.

You can get a specific day, date, add days to date and get results which are friendly and easy to understand.

Compare dates and time, obtain results in formats you want to use. Convert any date, time formats to elixir formats and vice-versa.

Get current date, yesterday, tommmorow with or without time zones(utc by default).

Link to this section Summary

Functions

Compare dates in two different formats including elixir format and get results in human readable and friendly way

Format time in the way you specify and vice-versa

Get yesterday’s date

Link to this section Functions

Link to this function compare_date(date1, date2)

Compare dates in two different formats including elixir format and get results in human readable and friendly way.

Examples

iex> Datex.Date.compare("18 Sept, 2018", "15/08/2018")
"a month and 4 days later"
Link to this function format_time(time, format)

Format time in the way you specify and vice-versa.

Examples

iex> Datex.Time.format_time("12:45 pm", "elixir")
~T[12:45:00.000000]

Get yesterday’s date

Examples

iex> Datex.Date.yesterday()
"16 September, 2018"