[Qt-interest] How calculate time span (days, hours, minutes) QDateTime difference?

Grego grego at mpaja.com
Sat Jun 12 12:55:50 CEST 2010


Just FYI, another clean and well documented datetime API is provided in
Python.

http://docs.python.org/library/datetime.html#module-datetime

It provides five classes:

data, time, datetime, timedelta, tzinfo.

As python license is very liberal, even the Qt implementation implementation
could be based on that.
The python datetime module is in C, so it should be pretty straight forward
to port to Qt.

See:

http://svn.python.org/view/python/trunk/Modules/datetimemodule.c?revision=81681&view=markup

As you see, there are plenty of details that must be gotten right, so it
might not be worth it to reinvent the wheel too much.


-- 
Grego
http://mpaja.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100612/6d723687/attachment.html 


More information about the Qt-interest-old mailing list