summaryrefslogtreecommitdiff
path: root/datetime.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-07-17 22:23:14 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-07-17 22:23:14 -0400
commit41e8d1871e067656c6df03edf49bee6d8ae9f02c (patch)
treee4d2ca17ed3b03882f49a85f257cbf2616d04f65 /datetime.h
parent3d1ab0e4e7ebf87d811572e43ef0dda42696a0d4 (diff)
downloadfork-ledger-41e8d1871e067656c6df03edf49bee6d8ae9f02c.tar.gz
fork-ledger-41e8d1871e067656c6df03edf49bee6d8ae9f02c.tar.bz2
fork-ledger-41e8d1871e067656c6df03edf49bee6d8ae9f02c.zip
Changes to allow DATETIME values to be negated, for the purposes of reverse
sorting.
Diffstat (limited to 'datetime.h')
-rw-r--r--datetime.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/datetime.h b/datetime.h
index 371cadbd..c057c76b 100644
--- a/datetime.h
+++ b/datetime.h
@@ -19,9 +19,6 @@ class date_t
{
date_t(const datetime_t& _when);
- protected:
- std::time_t when;
-
public:
static date_t now;
static const char * formats[];
@@ -29,6 +26,8 @@ class date_t
static std::string input_format;
static std::string output_format;
+ std::time_t when;
+
date_t() : when(0) {}
date_t(const date_t& _when) : when(_when.when) {}