Hi - this bothers me because every time when I wan't to add longer period 
of time I need to manually calculate the number instead of use something 
built in or use erlang.

`DateTime.add(DateTime.utc_now(), :timer.hours(-30 * 24), :millisecond)` .

Erlang has up to 1hour shortcut functions - but 1day still is 24h and 
everytime let's say we wan't to expire some old data from database then 
DateTime.add(-30, :days) is still plenty good for most of the cases.
In python timedelta you can specify also weeks:
```
from datetime import timedelta delta = timedelta( days=50, seconds=27, 
microseconds=10, milliseconds=29000, minutes=5, hours=8, weeks=2 )
```

-- 
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 on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/b3abc7f0-7989-42f5-a087-3443155f69d6n%40googlegroups.com.

Reply via email to