Seweryn Habdank-Wojewódzki wrote:
Hi!
I wonder if there is any posibility to change boost::datetime result class eg. long to any bignum class eg. from GMP library or double type.
It is important question for calculation distance between let's say 1900 and 2100 and using method eg. total_seconds(). There is no methods like total_minutes(), total_hours(), total_days() and so on, so if I would like to have a distance in days I have to calculate distance in seconds and recalculate it to days, but for big distances total_seconds() exceeded long ranges.
Doubles are explicitly not used to avoid the precision issues in calculations. However, the library is designed with templates that allow exactly this sort of internal representation replacement. And, in fact, the normal internal representations for times use either 64 or 96 bits -- so I believe you're use case is already covered. Have you tried it? Jeff