diff options
author | John Wiegley <johnw@newartisans.com> | 2004-08-18 02:15:31 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-08-18 02:15:31 -0400 |
commit | 8af33274fbb9cf0c9a4a452b77825ab6e519cf8d (patch) | |
tree | 20cade7c1ab8986db969a17e823168829b97c3f7 /datetime.h | |
parent | 9d1bdd0989996318825a458e01b7b0eb5f48397f (diff) | |
download | fork-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.h | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -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); |