gnc_pricedb_lookup_at_time

Robert Graham Merkel rgmerk@mira.net (Robert Graham Merkel)
Wed, 21 Mar 2001 16:06:21 +1100


I'm currently writing a stock portfolio report, and it allows 
you to display a portfolio at any moment (up to the present,
obviously).  This poses a slight problem - how do you get an
appropriate historical price?

gnc_pricedb_lookup_at_time, looking at the code, returns prices only
if the timespec in the price record exactly matches the time argument.

I would assume that if you didn't have a price for time t, you'd
use a price from the closest previous time.  Is this a correct
assumption, and how can I get such a price?

------------------------------------------------------------
Robert Merkel	                           rgmerk@mira.net

<telsa> I left my client on #gtk+ overnight and there was nothing 
in scrollback at all except quit/rejoins.
<bighead> telsa: well its been that for, I think 3 days now 
(ever since started coming back on IRC)
<telsa> Clearly they are busy implementing telepathy, 
and dog-fooding it. :) 
------------------------------------------------------------