Add time64 functions for gncEntry

This commit is contained in:
lmat 2017-12-18 06:51:33 -08:00 committed by Christopher Lam
parent dbd1473730
commit 0bf0989aa7
2 changed files with 12 additions and 0 deletions

View File

@ -884,6 +884,11 @@ Timespec gncEntryGetDate (const GncEntry *entry)
return entry->date;
}
time64 gncEntryGetDateTT (const GncEntry *entry)
{
return entry ? entry->date.tv_sec : 0;
}
GDate gncEntryGetDateGDate(const GncEntry *entry)
{
return timespec_to_gdate(gncEntryGetDate(entry));
@ -898,6 +903,11 @@ Timespec gncEntryGetDateEntered (const GncEntry *entry)
return entry->date_entered;
}
time64 gncEntryGetDateEnteredTT (const GncEntry *entry)
{
return entry ? entry->date_entered.tv_sec : 0;
}
const char * gncEntryGetDescription (const GncEntry *entry)
{
if (!entry) return NULL;

View File

@ -161,6 +161,8 @@ is a misleading extra information. We are only dealing with the day
information! */
Timespec gncEntryGetDate (const GncEntry *entry);
Timespec gncEntryGetDateEntered (const GncEntry *entry);
time64 gncEntryGetDateTT (const GncEntry *entry);
time64 gncEntryGetDateEnteredTT (const GncEntry *entry);
const char * gncEntryGetDescription (const GncEntry *entry);
const char * gncEntryGetAction (const GncEntry *entry);
const char * gncEntryGetNotes (const GncEntry *notes);