summaryrefslogtreecommitdiff
path: root/datetime.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-08-18 02:15:31 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-08-18 02:15:31 -0400
commit8af33274fbb9cf0c9a4a452b77825ab6e519cf8d (patch)
tree20cade7c1ab8986db969a17e823168829b97c3f7 /datetime.h
parent9d1bdd0989996318825a458e01b7b0eb5f48397f (diff)
downloadfork-ledger-8af33274fbb9cf0c9a4a452b77825ab6e519cf8d.tar.gz
fork-ledger-8af33274fbb9cf0c9a4a452b77825ab6e519cf8d.tar.bz2
fork-ledger-8af33274fbb9cf0c9a4a452b77825ab6e519cf8d.zip
more time interval support: last month, last feb, next year, etc.
Diffstat (limited to 'datetime.h')
-rw-r--r--datetime.h13
1 files changed, 6 insertions, 7 deletions
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);