[H-GEN] time in C/C++
Frank Brand
fbrand at uq.net.au
Sat Dec 25 21:55:03 EST 1999
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Please observe the list's charter. ]
I am writing a small financial programme (using graphapp as a Linux replacement
for VB...its not that GUI user friendly but it is quite neat just the same).
The programme is an implementation of the RBA formula for pricing a bond.
The most difficult part of the process is calculating the days between two
dates so its not exactly a major taxing of the intellect.
My query is to asak what people think about the best way of getting the time
between dates. Originally, I thought to use difftime() but I believe that this
method can lead to errors under some circumstances.
The whole process is simple , even if the formula is not (it is a fairly
complex formula but once the individual parameters are known it is just a case
of substituting values).
For safety's sake I thought I would just write my own function as the price of
the bond is critically dependent on getting the date differences right.
Anyone want to offer an opinion.
--
Frank Brand
E-mail: fbrand at uq.net.au
Home Page: http://www.uq.net.au/~zzfbrand
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.
More information about the General
mailing list