mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Move xaccTransGetDateStr from Transaction.c to TransLog.c.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3103 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
da20e1a7c4
commit
5974d8da52
@ -274,6 +274,22 @@ xaccSplitAsString(Split *split, const char prefix[]) {
|
||||
return(result);
|
||||
}
|
||||
|
||||
static char *
|
||||
xaccTransGetDateStr (Transaction *trans)
|
||||
{
|
||||
char buf [MAX_DATE_LENGTH];
|
||||
struct tm *date;
|
||||
time_t secs;
|
||||
|
||||
secs = xaccTransGetDate (trans);
|
||||
|
||||
date = localtime (&secs);
|
||||
|
||||
printDate(buf, date->tm_mday, date->tm_mon+1, date->tm_year +1900);
|
||||
|
||||
return strdup (buf);
|
||||
}
|
||||
|
||||
char *
|
||||
xaccTransAsString(Transaction *txn, const char prefix[]) {
|
||||
char *result = NULL;
|
||||
|
@ -1928,22 +1928,6 @@ xaccTransSetDateTS (Transaction *trans, const Timespec *ts)
|
||||
trans->date_posted.tv_nsec = ts->tv_nsec;
|
||||
}
|
||||
|
||||
char *
|
||||
xaccTransGetDateStr (Transaction *trans)
|
||||
{
|
||||
char buf [MAX_DATE_LENGTH];
|
||||
struct tm *date;
|
||||
time_t secs;
|
||||
|
||||
secs = xaccTransGetDate (trans);
|
||||
|
||||
date = localtime (&secs);
|
||||
|
||||
printDate(buf, date->tm_mday, date->tm_mon+1, date->tm_year +1900);
|
||||
|
||||
return strdup (buf);
|
||||
}
|
||||
|
||||
void
|
||||
xaccTransSetDateEnteredTS (Transaction *trans, const Timespec *ts)
|
||||
{
|
||||
|
@ -227,12 +227,6 @@ void xaccTransGetDateTS (Transaction *trans, Timespec *ts);
|
||||
|
||||
void xaccTransGetDateEnteredTS (Transaction *trans, Timespec *ts);
|
||||
|
||||
/* The xaccTransGetDateStr() method will return a malloc'ed string
|
||||
* representing the posted date of the transaction, or NULL if
|
||||
* the argument is NULL.
|
||||
*/
|
||||
char * xaccTransGetDateStr (Transaction *trans);
|
||||
|
||||
/* The xaccTransCountSplits() method returns the number of splits
|
||||
* in a transaction.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user