diff options
author | John Wiegley <johnw@newartisans.com> | 2004-08-12 20:06:06 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-08-12 20:06:06 -0400 |
commit | 7610aec86df0fd5c49303a8ed984f16a0f0b1e1f (patch) | |
tree | d1dc8cfc48863aa067203083b2a702d5e4bba907 /datetime.h | |
parent | 02be02011b33051bafd1639c534967c7626fabbb (diff) | |
download | fork-ledger-7610aec86df0fd5c49303a8ed984f16a0f0b1e1f.tar.gz fork-ledger-7610aec86df0fd5c49303a8ed984f16a0f0b1e1f.tar.bz2 fork-ledger-7610aec86df0fd5c49303a8ed984f16a0f0b1e1f.zip |
added support for interval reporting; changed some option flags
Diffstat (limited to 'datetime.h')
-rw-r--r-- | datetime.h | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -11,21 +11,23 @@ struct interval_t unsigned long months; unsigned long seconds; - interval_t(unsigned long _seconds, unsigned long _months, - unsigned long _years) + interval_t(unsigned long _seconds, unsigned long _months = 0, + unsigned long _years = 0) : years(_years), months(_months), seconds(_seconds) {} std::time_t increment(const std::time_t); + + static interval_t * parse(std::istream& in); }; -extern bool parse_date_mask(const char * date_str, struct std::tm * result); +extern struct std::tm * now_tm; -extern bool parse_date(const char * date_str, std::time_t * result, - const int year = -1); +bool parse_date_mask(const char * date_str, struct std::tm * result); -extern bool quick_parse_date(char * date_str, std::time_t * result); +bool parse_date(const char * date_str, std::time_t * result, + const int year = -1); -extern struct std::tm * now_tm; +bool quick_parse_date(char * date_str, std::time_t * result); } // namespace ledger |