[issue29866] Added datetime_diff to datetime.py.

2017-03-22 Thread Decorater
Decorater added the comment: an url preview of the bug itself https://travis-ci.org/AraHaan/datetime_diff/jobs/213944228 -- ___ Python tracker ___ __

[issue29866] Added datetime_diff to datetime.py.

2017-03-22 Thread Decorater
Decorater added the comment: Yeah, I could. I did just realize that there is a bug in it though that sometimes if it is like 58 seconds into a minute and you sleep for 15 that the code then thinks an entire minute elapsed when it has not. I need to think of a way to bypass that bug first. I fo

[issue29866] Added datetime_diff to datetime.py.

2017-03-22 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Without stating an opinion on the change, I'd suggest first posting to python-ideas (unless you already did so and I missed it :-) to get an initial reaction from folks on your idea before coming to b.p.o. If you have the backing of python-ideas you mi

[issue29866] Added datetime_diff to datetime.py.

2017-03-21 Thread Decorater
Decorater added the comment: I plan to also have it to where if it is the last unit in the thing that it appends an and to the end as well. -- ___ Python tracker ___ ___

[issue29866] Added datetime_diff to datetime.py.

2017-03-21 Thread Decorater
Decorater added the comment: Alright I revised it a bit locally too >>> import datetime >>> datetime.datetime_diff(datetime.datetime(2017, 1, 31), >>> datetime.datetime(2017, 1, 31)) '' >>> datetime.datetime_diff(datetime.datetime(2016, 12, 31, 23, 59, 59), >>> datetime.datetime(2017, 1, 1)) '

[issue29866] Added datetime_diff to datetime.py.

2017-03-21 Thread Decorater
Decorater added the comment: Oh, I just realized I forgot to add other if's to each block in case certain parts was 0 but others was not. I also realized I tried to do datetime.datetime.new instead of datetime.datetime.now on the tests. -- ___ Pytho

[issue29866] Added datetime_diff to datetime.py.

2017-03-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In that case you can publish your code as a receipt or as a module on PyPI. If it will be popular enough we can consider including it in the stdlib. Currently your code is just broken. >>> datetime.datetime_diff(datetime.datetime(2017, 1, 31), >>> datetime.

[issue29866] Added datetime_diff to datetime.py.

2017-03-20 Thread Decorater
Decorater added the comment: I have people who would use it and there are use cases for it as well. Also it works perfectly fine the other one I added to it's docstring is an example datetime object of my very own discord account from when I created it. --

[issue29866] Added datetime_diff to datetime.py.

2017-03-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In most cases you needed localized version. And I doubt that it makes much sense to output seconds seconds when the difference is larger than a year. Often you need to use other units for quantizations, e.g. "1 1/4 hours ago" as on this tracker. This functi

[issue29866] Added datetime_diff to datetime.py.

2017-03-20 Thread Decorater
New submission from Decorater: The datetime_diff function compares two datetime objects and returns the time since the prior datetime objects (based on the current datetime object) in a what that is readable by humans. This is useful when one might need to compare two datetime objects, keeping

[issue29866] Added datetime_diff to datetime.py.

2017-03-20 Thread Decorater
Changes by Decorater : -- pull_requests: +663 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth