summaryrefslogtreecommitdiff
path: root/datetime.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-08-11 03:23:19 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-08-11 03:23:19 -0400
commitcd8f61fb2da08c9dbbc2edba027275660a3fd2b9 (patch)
treed0a8ec1cd5845d086fc9bacdde9c329d3d49f1b7 /datetime.h
parent3edf2986335280bb13fffc51f23212622a79c9a9 (diff)
downloadfork-ledger-cd8f61fb2da08c9dbbc2edba027275660a3fd2b9.tar.gz
fork-ledger-cd8f61fb2da08c9dbbc2edba027275660a3fd2b9.tar.bz2
fork-ledger-cd8f61fb2da08c9dbbc2edba027275660a3fd2b9.zip
more cleanup
Diffstat (limited to 'datetime.h')
-rw-r--r--datetime.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/datetime.h b/datetime.h
index 6c9d001a..8e2ffbbd 100644
--- a/datetime.h
+++ b/datetime.h
@@ -5,6 +5,19 @@
namespace ledger {
+struct interval_t
+{
+ unsigned long years;
+ unsigned long months;
+ unsigned long seconds;
+
+ interval_t(unsigned long _seconds, unsigned long _months,
+ unsigned long _years)
+ : years(_years), months(_months), seconds(_seconds) {}
+
+ std::time_t increment(const std::time_t);
+};
+
extern bool parse_date_mask(const char * date_str, struct std::tm * result);
extern bool parse_date(const char * date_str, std::time_t * result,