Btw, one of somewhat recent nice ergonomic improvement was replacing:

   DateTime.utc_now() |> DateTime.truncate(:second)

with:

   DateTime.utc_now(:second)

I think it might be relevant for the proposal. Is either of these appealing?

   # option 1
   DateTime.from_utc_now(:seconds, hour: 1)
   # option 2
   DateTime.from_utc_now([hour: 1], :seconds)

On the other hand, do we instead add :utc_now, :utc_now_seconds, and possibly 
others? I’m not sure.

If supporting precision is important, to me DateTime.from_utc_now(duration, 
precision \\ :microsecond) feels like the best option after all.



-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/elixir-lang-core/8BC8C9BF-BA83-49A0-BD07-91E789B3BAE8%40wojtekmach.pl.

Reply via email to