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:
Dave Peticolas 2000-10-31 09:36:07 +00:00
parent da20e1a7c4
commit 5974d8da52
3 changed files with 16 additions and 22 deletions

View File

@ -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;

View File

@ -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)
{

View File

@ -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.
*/