From 8af33274fbb9cf0c9a4a452b77825ab6e519cf8d Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 18 Aug 2004 02:15:31 -0400 Subject: more time interval support: last month, last feb, next year, etc. --- datetime.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'datetime.h') diff --git a/datetime.h b/datetime.h index bc32032a..6f6ad1df 100644 --- a/datetime.h +++ b/datetime.h @@ -9,12 +9,11 @@ namespace ledger { struct interval_t { - unsigned long years; - unsigned long months; - unsigned long seconds; + int years; + int months; + int seconds; - interval_t(unsigned long _seconds, unsigned long _months = 0, - unsigned long _years = 0) + interval_t(int _seconds, int _months = 0, int _years = 0) : years(_years), months(_months), seconds(_seconds) {} std::time_t increment(const std::time_t); @@ -23,8 +22,8 @@ struct interval_t std::time_t * end); }; -extern std::time_t now; -extern struct std::tm * now_tm; +extern std::time_t now; +extern int now_year; bool parse_date_mask(const char * date_str, struct std::tm * result); -- cgit v1.2.3