mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Adding some time64 alternatives
This commit is contained in:
parent
2f89e4595b
commit
61d4aaaf08
@ -2402,6 +2402,12 @@ xaccTransRetDatePostedTS (const Transaction *trans)
|
||||
return trans ? trans->date_posted : ts;
|
||||
}
|
||||
|
||||
time64
|
||||
xaccTransRetDatePosted (const Transaction *trans)
|
||||
{
|
||||
return trans ? trans->date_posted.tv_sec : 0;
|
||||
}
|
||||
|
||||
GDate
|
||||
xaccTransGetDatePostedGDate (const Transaction *trans)
|
||||
{
|
||||
@ -2445,6 +2451,12 @@ xaccTransRetDateEnteredTS (const Transaction *trans)
|
||||
return trans ? trans->date_entered : ts;
|
||||
}
|
||||
|
||||
time64
|
||||
xaccTransRetDateEntered (const Transaction *trans)
|
||||
{
|
||||
return trans ? trans->date_entered.tv_sec : 0;
|
||||
}
|
||||
|
||||
void
|
||||
xaccTransGetDateDueTS (const Transaction *trans, Timespec *ts)
|
||||
{
|
||||
|
@ -656,6 +656,7 @@ void xaccTransGetDatePostedTS (const Transaction *trans, Timespec *ts);
|
||||
having different function names, GetDate and GetDatePosted refer
|
||||
to the same single date.)*/
|
||||
Timespec xaccTransRetDatePostedTS (const Transaction *trans);
|
||||
time64 xaccTransRetDatePosted (const Transaction *trans);
|
||||
/** Retrieve the posted date of the transaction. The posted date is
|
||||
the date when this transaction was posted at the bank. */
|
||||
GDate xaccTransGetDatePostedGDate (const Transaction *trans);
|
||||
@ -671,6 +672,7 @@ void xaccTransGetDateEnteredTS (const Transaction *trans, Timespec *ts)
|
||||
/** Retrieve the date of when the transaction was entered. The entered
|
||||
* date is the date when the register entry was made.*/
|
||||
Timespec xaccTransRetDateEnteredTS (const Transaction *trans);
|
||||
time64 xaccTransRetDateEntered (const Transaction *trans);
|
||||
|
||||
/** Dates and txn-type for A/R and A/P "invoice" postings */
|
||||
Timespec xaccTransRetDateDueTS (const Transaction *trans);
|
||||
|
@ -591,6 +591,13 @@ gnc_price_get_commodity(const GNCPrice *p)
|
||||
return p->commodity;
|
||||
}
|
||||
|
||||
time64
|
||||
gnc_price_get_time64(const GNCPrice *p)
|
||||
{
|
||||
if (!p) return 0;
|
||||
return p->tmspec.tv_sec;
|
||||
}
|
||||
|
||||
Timespec
|
||||
gnc_price_get_time(const GNCPrice *p)
|
||||
{
|
||||
|
@ -257,6 +257,7 @@ gnc_commodity * gnc_price_get_commodity(const GNCPrice *p);
|
||||
/*@ dependent @*/
|
||||
gnc_commodity * gnc_price_get_currency(const GNCPrice *p);
|
||||
Timespec gnc_price_get_time(const GNCPrice *p);
|
||||
time64 gnc_price_get_time64(const GNCPrice *p);
|
||||
PriceSource gnc_price_get_source(const GNCPrice *p);
|
||||
const char * gnc_price_get_source_string(const GNCPrice *p);
|
||||
const char * gnc_price_get_typestr(const GNCPrice *p);
|
||||
|
Loading…
Reference in New Issue
Block a user