mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
ADD-TIME64-API: libgnucash/engine/gnc-pricedb.[ch]
gnc_pricedb_lookup_nearest_in_time64 gnc_pricedb_lookup_nearest_in_time_any_currency_t64
This commit is contained in:
parent
2f2ad18dfe
commit
465c9e1f21
@ -2068,6 +2068,18 @@ gnc_pricedb_lookup_nearest_in_time_any_currency(GNCPriceDB *db,
|
||||
return result;
|
||||
}
|
||||
|
||||
PriceList *
|
||||
gnc_pricedb_lookup_nearest_in_time_any_currency_t64(GNCPriceDB *db,
|
||||
const gnc_commodity *commodity,
|
||||
time64 t64)
|
||||
{
|
||||
Timespec t;
|
||||
t.tv_sec = t64;
|
||||
t.tv_nsec = 0;
|
||||
|
||||
return gnc_pricedb_lookup_nearest_in_time_any_currency(db, commodity, t);
|
||||
}
|
||||
|
||||
PriceList *
|
||||
gnc_pricedb_lookup_latest_before_any_currency(GNCPriceDB *db,
|
||||
const gnc_commodity *commodity,
|
||||
@ -2442,6 +2454,18 @@ gnc_pricedb_lookup_nearest_in_time(GNCPriceDB *db,
|
||||
return lookup_nearest_in_time(db, c, currency, t, FALSE);
|
||||
}
|
||||
|
||||
GNCPrice *
|
||||
gnc_pricedb_lookup_nearest_in_time64(GNCPriceDB *db,
|
||||
const gnc_commodity *c,
|
||||
const gnc_commodity *currency,
|
||||
time64 t64)
|
||||
{
|
||||
Timespec t;
|
||||
t.tv_sec = t64;
|
||||
t.tv_nsec = 0;
|
||||
return lookup_nearest_in_time(db, c, currency, t, FALSE);
|
||||
}
|
||||
|
||||
GNCPrice *
|
||||
gnc_pricedb_lookup_latest_before (GNCPriceDB *db,
|
||||
gnc_commodity *c,
|
||||
|
@ -517,6 +517,11 @@ GNCPrice * gnc_pricedb_lookup_nearest_in_time(GNCPriceDB *db,
|
||||
const gnc_commodity *currency,
|
||||
Timespec t);
|
||||
|
||||
GNCPrice * gnc_pricedb_lookup_nearest_in_time64(GNCPriceDB *db,
|
||||
const gnc_commodity *c,
|
||||
const gnc_commodity *currency,
|
||||
time64 t);
|
||||
|
||||
/** @brief Return the price nearest in time to that given between the given
|
||||
* commodity and every other.
|
||||
*
|
||||
@ -532,6 +537,9 @@ GNCPrice * gnc_pricedb_lookup_nearest_in_time(GNCPriceDB *db,
|
||||
PriceList * gnc_pricedb_lookup_nearest_in_time_any_currency(GNCPriceDB *db,
|
||||
const gnc_commodity *c,
|
||||
Timespec t);
|
||||
PriceList * gnc_pricedb_lookup_nearest_in_time_any_currency_t64(GNCPriceDB *db,
|
||||
const gnc_commodity *c,
|
||||
time64 t64);
|
||||
|
||||
/** @brief Return the latest price between the given commodities before the
|
||||
* given time.
|
||||
|
Loading…
Reference in New Issue
Block a user