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;
|
return trans ? trans->date_posted : ts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
time64
|
||||||
|
xaccTransRetDatePosted (const Transaction *trans)
|
||||||
|
{
|
||||||
|
return trans ? trans->date_posted.tv_sec : 0;
|
||||||
|
}
|
||||||
|
|
||||||
GDate
|
GDate
|
||||||
xaccTransGetDatePostedGDate (const Transaction *trans)
|
xaccTransGetDatePostedGDate (const Transaction *trans)
|
||||||
{
|
{
|
||||||
@ -2445,6 +2451,12 @@ xaccTransRetDateEnteredTS (const Transaction *trans)
|
|||||||
return trans ? trans->date_entered : ts;
|
return trans ? trans->date_entered : ts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
time64
|
||||||
|
xaccTransRetDateEntered (const Transaction *trans)
|
||||||
|
{
|
||||||
|
return trans ? trans->date_entered.tv_sec : 0;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
xaccTransGetDateDueTS (const Transaction *trans, Timespec *ts)
|
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
|
having different function names, GetDate and GetDatePosted refer
|
||||||
to the same single date.)*/
|
to the same single date.)*/
|
||||||
Timespec xaccTransRetDatePostedTS (const Transaction *trans);
|
Timespec xaccTransRetDatePostedTS (const Transaction *trans);
|
||||||
|
time64 xaccTransRetDatePosted (const Transaction *trans);
|
||||||
/** Retrieve the posted date of the transaction. The posted date is
|
/** Retrieve the posted date of the transaction. The posted date is
|
||||||
the date when this transaction was posted at the bank. */
|
the date when this transaction was posted at the bank. */
|
||||||
GDate xaccTransGetDatePostedGDate (const Transaction *trans);
|
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
|
/** Retrieve the date of when the transaction was entered. The entered
|
||||||
* date is the date when the register entry was made.*/
|
* date is the date when the register entry was made.*/
|
||||||
Timespec xaccTransRetDateEnteredTS (const Transaction *trans);
|
Timespec xaccTransRetDateEnteredTS (const Transaction *trans);
|
||||||
|
time64 xaccTransRetDateEntered (const Transaction *trans);
|
||||||
|
|
||||||
/** Dates and txn-type for A/R and A/P "invoice" postings */
|
/** Dates and txn-type for A/R and A/P "invoice" postings */
|
||||||
Timespec xaccTransRetDateDueTS (const Transaction *trans);
|
Timespec xaccTransRetDateDueTS (const Transaction *trans);
|
||||||
|
@ -591,6 +591,13 @@ gnc_price_get_commodity(const GNCPrice *p)
|
|||||||
return p->commodity;
|
return p->commodity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
time64
|
||||||
|
gnc_price_get_time64(const GNCPrice *p)
|
||||||
|
{
|
||||||
|
if (!p) return 0;
|
||||||
|
return p->tmspec.tv_sec;
|
||||||
|
}
|
||||||
|
|
||||||
Timespec
|
Timespec
|
||||||
gnc_price_get_time(const GNCPrice *p)
|
gnc_price_get_time(const GNCPrice *p)
|
||||||
{
|
{
|
||||||
|
@ -257,6 +257,7 @@ gnc_commodity * gnc_price_get_commodity(const GNCPrice *p);
|
|||||||
/*@ dependent @*/
|
/*@ dependent @*/
|
||||||
gnc_commodity * gnc_price_get_currency(const GNCPrice *p);
|
gnc_commodity * gnc_price_get_currency(const GNCPrice *p);
|
||||||
Timespec gnc_price_get_time(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);
|
PriceSource gnc_price_get_source(const GNCPrice *p);
|
||||||
const char * gnc_price_get_source_string(const GNCPrice *p);
|
const char * gnc_price_get_source_string(const GNCPrice *p);
|
||||||
const char * gnc_price_get_typestr(const GNCPrice *p);
|
const char * gnc_price_get_typestr(const GNCPrice *p);
|
||||||
|
Loading…
Reference in New Issue
Block a user