summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2005-05-31 04:56:08 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:41:10 -0400
commit6d7827af5ad53e746a11bbc5443fda1e6a908582 (patch)
treee916f4263fee4f52e0cdef7a4c19731baa70f518
parentcc38fc235fc848e9cdeec81ee467bddaaa180e89 (diff)
downloadfork-ledger-6d7827af5ad53e746a11bbc5443fda1e6a908582.tar.gz
fork-ledger-6d7827af5ad53e746a11bbc5443fda1e6a908582.tar.bz2
fork-ledger-6d7827af5ad53e746a11bbc5443fda1e6a908582.zip
Added --input-date-format, which affects how dates in textual and QIF
files are parsed -- but not the dates inside a price database, whose format is fixed.
-rw-r--r--config.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/config.cc b/config.cc
index 1e9dd73c..737f51cb 100644
--- a/config.cc
+++ b/config.cc
@@ -1,6 +1,7 @@
#include "config.h"
#include "acconf.h"
#include "option.h"
+#include "datetime.h"
#include "quotes.h"
#include "walk.h"
#ifdef USE_BOOST_PYTHON
@@ -688,6 +689,12 @@ OPT_BEGIN(date_format, "y:") {
config.date_format = optarg;
} OPT_END(date_format);
+OPT_BEGIN(input_date_format, ":") {
+ std::strcpy(input_format, optarg);
+ formats[0] = input_format;
+ formats[1] = NULL;
+} OPT_END(input_date_format);
+
OPT_BEGIN(balance_format, ":") {
config.balance_format = optarg;
} OPT_END(balance_format);