[Chicago] OverflowError: days=1002410023; must have magnitude <= 999999999

Allan Spale allan2600 at gmail.com
Wed May 20 20:14:55 CEST 2009

Hi Lucas,

Actually, the maximum positive 32-bit integer is 2147483647 (see an example
for calculating that here:
http://www.velocityreviews.com/forums/t366257-range-of-int-type.html), and I
believe that all numbers are signed regardless of size.

I had to do a lot of date calculation and find mxDateTime to be a wonderful
library for calculating dates and elapsed days from a certain date:
http://www.egenix.com/products/python/mxBase/mxDateTime/. One downside is
that this module is based on C libraries, so moving to another platform
might require some compiling (Windows binaries are provided).


On Wed, May 20, 2009 at 1:05 PM, Lukasz Szybalski <szybalski at gmail.com>wrote:

> Hello,
> Anybody knows how to overcome this error?
> I have transactions that have effective and expiration dates and I
> need to calculate how many days are within each transaction(2 million
> transactions) and provide a total numbers of days  for that particular
> year.
> There seem to be a limit of # -999999999 <= days <= 999999999
> I'm not sure why ?
> If 2147483648 is the 32 bit integer limit then I should have a long way to
> go?
> Is this a bug in the library?
> Thanks,
> Lucas
> --
> How to create python package?
> http://lucasmanual.com/mywiki/PythonPaste
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> http://mail.python.org/mailman/listinfo/chicago
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20090520/95bfc777/attachment.htm>

More information about the Chicago mailing list