summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/annotate.cc2
-rw-r--r--test/baseline/opt-equity.test2
-rw-r--r--test/baseline/opt-lot-dates.test2
-rw-r--r--test/baseline/opt-lots-actual.test2
-rw-r--r--test/baseline/opt-lots.test2
-rw-r--r--test/baseline/opt-register-format.test2
-rw-r--r--test/regress/383.test29
7 files changed, 35 insertions, 6 deletions
diff --git a/src/annotate.cc b/src/annotate.cc
index ab5c6e17..0cb7a24e 100644
--- a/src/annotate.cc
+++ b/src/annotate.cc
@@ -206,7 +206,7 @@ void annotation_t::print(std::ostream& out, bool keep_base,
if (date &&
(! no_computed_annotations || ! has_flags(ANNOTATION_DATE_CALCULATED)))
- out << " [" << format_date(*date, FMT_WRITTEN) << ']';
+ out << " [" << format_date(*date, FMT_PRINTED) << ']';
if (tag &&
(! no_computed_annotations || ! has_flags(ANNOTATION_TAG_CALCULATED)))
diff --git a/test/baseline/opt-equity.test b/test/baseline/opt-equity.test
index 35ea6b1e..faffc085 100644
--- a/test/baseline/opt-equity.test
+++ b/test/baseline/opt-equity.test
@@ -46,7 +46,7 @@ test equity --lot-prices
Equity:Opening Balances 3.80 GBP
end test
-test equity --lots
+test equity --lots --date-format %Y/%m/%d
2011/03/05 Opening Balances
Assets:Bank -3.80 GBP
Assets:Broker 2 AAA {0.90 GBP} [2011/03/04]
diff --git a/test/baseline/opt-lot-dates.test b/test/baseline/opt-lot-dates.test
index c07e96e8..b74dfe27 100644
--- a/test/baseline/opt-lot-dates.test
+++ b/test/baseline/opt-lot-dates.test
@@ -549,7 +549,7 @@ D 1.00G
Assets:Tajer:Items "Orb of Deception" 1 @ 155G
Assets:Tajer
-test reg -F '%(justify(scrub(total_expr), 80, 80, true))\n' --lot-dates
+test reg -F '%(justify(scrub(total_expr), 80, 80, true))\n' --lot-dates --date-format %Y/%m/%d
133.98G
158.85G
0
diff --git a/test/baseline/opt-lots-actual.test b/test/baseline/opt-lots-actual.test
index 395b0eaf..6cd9b2f4 100644
--- a/test/baseline/opt-lots-actual.test
+++ b/test/baseline/opt-lots-actual.test
@@ -5,7 +5,7 @@ D 1.0000s
Assets:Gruulmorg 248720c @ 10.051463493s
Equity:Gold -5000000s
-test reg --format '%(justify(scrub(total_expr), 40, 40, true))\n' --lots
+test reg --format '%(justify(scrub(total_expr), 40, 40, true))\n' --lots --date-format %Y/%m/%d
1339829c {1.86590975416s} [2006/03/14]
1339829c {1.86590975416s} [2006/03/14]
248720c {10.051463493s} [2006/03/14]
diff --git a/test/baseline/opt-lots.test b/test/baseline/opt-lots.test
index bd47fb1e..7a86c662 100644
--- a/test/baseline/opt-lots.test
+++ b/test/baseline/opt-lots.test
@@ -549,7 +549,7 @@ D 1.00G
Assets:Tajer:Items "Orb of Deception" 1 @ 155G
Assets:Tajer
-test reg -F '%(justify(scrub(total_expr), 80, 80, true))\n' --lots
+test reg -F '%(justify(scrub(total_expr), 80, 80, true))\n' --lots --date-format %Y/%m/%d
133.98G
158.85G
0
diff --git a/test/baseline/opt-register-format.test b/test/baseline/opt-register-format.test
index 384accd8..843aa3ca 100644
--- a/test/baseline/opt-register-format.test
+++ b/test/baseline/opt-register-format.test
@@ -3,6 +3,6 @@
Income:Dividends:Vanguard:VMMXX $-0.35
test reg --register-format='%(amount)\n'
-0.350 VMMXX {$1.00} [2007/02/02]
+0.350 VMMXX {$1.00} [07-Feb-02]
$-0.35
end test
diff --git a/test/regress/383.test b/test/regress/383.test
new file mode 100644
index 00000000..ab4372fd
--- /dev/null
+++ b/test/regress/383.test
@@ -0,0 +1,29 @@
+
+--input-date-format %Y:%m:%d
+
+D 1000.00 GBP
+
+2014:05:12 * Test
+ Assets:Investments 100 AA {2.00 GBP} [2014:01:01] @@ 200.00 GBP
+ Equity:Opening balance
+
+test bal Assets:Investments --lots --date-format %Y.%m.%d
+100 AA {2.00 GBP} [2014.01.01] Assets:Investments
+end test
+
+test bal Assets:Investments --lots --date-format %Y/%m/%d
+100 AA {2.00 GBP} [2014/01/01] Assets:Investments
+end test
+
+test bal Assets:Investments --lots --date-format %Y:%m:%d
+100 AA {2.00 GBP} [2014:01:01] Assets:Investments
+end test
+
+test bal Assets:Investments --lots --date-format %Y-%m-%d
+100 AA {2.00 GBP} [2014-01-01] Assets:Investments
+end test
+
+test bal Assets:Investments --lots --date-format %g-%b-%d
+100 AA {2.00 GBP} [14-Jan-01] Assets:Investments
+end test
+