From 0bf0989aa77dbf2f7e66c65ac5c7a5bb4776d9c9 Mon Sep 17 00:00:00 2001 From: lmat Date: Mon, 18 Dec 2017 06:51:33 -0800 Subject: [PATCH] Add time64 functions for gncEntry --- libgnucash/engine/gncEntry.c | 10 ++++++++++ libgnucash/engine/gncEntry.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/libgnucash/engine/gncEntry.c b/libgnucash/engine/gncEntry.c index 151526f938..07bbd626df 100644 --- a/libgnucash/engine/gncEntry.c +++ b/libgnucash/engine/gncEntry.c @@ -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; diff --git a/libgnucash/engine/gncEntry.h b/libgnucash/engine/gncEntry.h index 8440396732..b47a33d098 100644 --- a/libgnucash/engine/gncEntry.h +++ b/libgnucash/engine/gncEntry.h @@ -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);