I can get the current datetime with Ecto like this:
Ecto.DateTime.utc
But how do I get tomorrows date like
Ecto.DateTime.utc + timedelta 1 day
?
How's about an answer for this?
Ecto.DateTime.utc
|> Ecto.DateTime.to_erl
|> :calendar.datetime_to_gregorian_seconds
|> Kernel.+(86400)
|> :calendar.gregorian_seconds_to_datetime
|> Ecto.DateTime.from_erl