3
3
3ds2012-04-03 08:04:15
Python
3ds, 2012-04-03 08:04:15

Python date diff

Tell me a ready-made solution that would give the difference of two dates in the form “1 year 2 months 3 days (2 hours 4 minutes - optional)” or at least as a list (y, m, d, H, i, s). It is possible template filter, it is possible .

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
Wott, 2012-04-03
@Wott

Why is it so difficult to take the difference in seconds and take the remainder of the division?

M
marazmiki, 2012-04-03
@marazmiki

pip install pytils

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question