Skip to content

Commit

Permalink
Mention alternatives to DateTime.compare/2 for comparison (#14147)
Browse files Browse the repository at this point in the history
  • Loading branch information
roelandvanbatenburg authored Jan 6, 2025
1 parent dcc27c2 commit 13baeb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/elixir/lib/calendar/datetime.ex
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ defmodule DateTime do
Remember, comparisons in Elixir using `==/2`, `>/2`, `</2` and friends
are structural and based on the DateTime struct fields. For proper
comparison between datetimes, use the `compare/2` function. The
existence of the `compare/2` function in this module also allows
comparison between datetimes, use the `compare/2`, `after?/2` and `before?/2` functions.
The existence of the `compare/2` function in this module also allows
using `Enum.min/2` and `Enum.max/2` functions to get the minimum and
maximum datetime of an `Enum`. For example:
Expand Down

0 comments on commit 13baeb5

Please sign in to comment.