summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/times.cc1
-rw-r--r--test/regress/1072.test31
2 files changed, 32 insertions, 0 deletions
diff --git a/src/times.cc b/src/times.cc
index 45734bdc..15009dc5 100644
--- a/src/times.cc
+++ b/src/times.cc
@@ -1812,6 +1812,7 @@ void times_initialize()
readers.push_back(shared_ptr<date_io_t>(new date_io_t("%Y/%m/%d", true)));
readers.push_back(shared_ptr<date_io_t>(new date_io_t("%Y/%m", true)));
readers.push_back(shared_ptr<date_io_t>(new date_io_t("%y/%m/%d", true)));
+ readers.push_back(shared_ptr<date_io_t>(new date_io_t("%Y-%m-%d", true)));
is_initialized = true;
}
diff --git a/test/regress/1072.test b/test/regress/1072.test
new file mode 100644
index 00000000..3f58b83f
--- /dev/null
+++ b/test/regress/1072.test
@@ -0,0 +1,31 @@
+
+--input-date-format %d/%m/%y
+--date-format %d/%m/%y
+
+1/1/14 * Test
+ A $10
+ B
+
+12/1/14 * Test
+ A $20
+ B
+
+test --input-date-format %d/%m/%y reg --begin 2/1/13
+01/01/14 Test A $10 $10
+ B $-10 0
+12/01/14 Test A $20 $20
+ B $-20 0
+end test
+
+test --input-date-format %d/%m/%y reg --begin 1/1/14
+01/01/14 Test A $10 $10
+ B $-10 0
+12/01/14 Test A $20 $20
+ B $-20 0
+end test
+
+test --input-date-format %d/%m/%y reg --begin 2/1/14
+12/01/14 Test A $20 $20
+ B $-20 0
+end test
+