Hey basically what the title says, I got a list of dates and i want to check if all of them have been passed or not and preferably return a boolean.
I was looking at Date.compare/2 or Date.diff/2 and have some magic around that but no success
def all_passed?(dates) do
Enum.all?(dates, fn date -> Date.compare(date, now) == :lt end)
end
4 Likes