File tree Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -31,9 +31,10 @@ defmodule Date do
3131
3232 Comparisons in Elixir using `==/2`, `>/2`, `</2` and similar are structural
3333 and based on the `Date` struct fields. For proper comparison between
34- dates, use the `compare/2` function. The existence of the `compare/2`
35- function in this module also allows using `Enum.min/2` and `Enum.max/2`
36- functions to get the minimum and maximum date of an `Enum`. For example:
34+ dates, use the `compare/2`, `after?/2` and `before?/2` functions.
35+ The existence of the `compare/2` function in this module also allows
36+ using `Enum.min/2` and `Enum.max/2` functions to get the minimum and
37+ maximum date of an `Enum`. For example:
3738
3839 iex> Enum.min([~D[2017-03-31], ~D[2017-04-01]], Date)
3940 ~D[2017-03-31]
Original file line number Diff line number Diff line change @@ -36,10 +36,10 @@ defmodule NaiveDateTime do
3636
3737 Comparisons in Elixir using `==/2`, `>/2`, `</2` and similar are structural
3838 and based on the `NaiveDateTime` struct fields. For proper comparison
39- between naive datetimes, use the `compare/2` function. The existence of the
40- `compare/2` function in this module also allows using `Enum.min/2` and
41- `Enum.max/2` functions to get the minimum and maximum naive datetime of an
42- `Enum`. For example:
39+ between naive datetimes, use the `compare/2`, `after?/2` and `before?/2` functions.
40+ The existence of the `compare/2` function in this module also allows
41+ using `Enum.min/2` and `Enum. max/2` functions to get the minimum and
42+ maximum naive datetime of an `Enum`. For example:
4343
4444 iex> Enum.min([~N[2020-01-01 23:00:07], ~N[2000-01-01 23:00:07]], NaiveDateTime)
4545 ~N[2000-01-01 23:00:07]
Original file line number Diff line number Diff line change @@ -31,9 +31,10 @@ defmodule Time do
3131
3232 Comparisons in Elixir using `==/2`, `>/2`, `</2` and similar are structural
3333 and based on the `Time` struct fields. For proper comparison between
34- times, use the `compare/2` function. The existence of the `compare/2`
35- function in this module also allows using `Enum.min/2` and `Enum.max/2`
36- functions to get the minimum and maximum time of an `Enum`. For example:
34+ times, use the `compare/2`, `after?/2` and `before?/2` functions.
35+ The existence of the `compare/2` function in this module also allows
36+ using `Enum.min/2` and `Enum.max/2` functions to get the minimum and
37+ maximum time of an `Enum`. For example:
3738
3839 iex> Enum.min([~T[23:00:07.001], ~T[10:00:07.001]], Time)
3940 ~T[10:00:07.001]
You can’t perform that action at this time.
0 commit comments