summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Rhodes <csr21@cantab.net>2014-04-23 17:43:43 +0100
committerChristophe Rhodes <csr21@cantab.net>2014-04-23 17:45:42 +0100
commite2d3e02b0d998a74b76f02f0f8e1fa3d5cd2df5e (patch)
treeb9b63caf6ac7e318a96f338c5bc086ba8cf6f38f
parentad4eac43a99af8f6d88efefd8921fb71d7626de0 (diff)
downloadfork-ledger-e2d3e02b0d998a74b76f02f0f8e1fa3d5cd2df5e.tar.gz
fork-ledger-e2d3e02b0d998a74b76f02f0f8e1fa3d5cd2df5e.tar.bz2
fork-ledger-e2d3e02b0d998a74b76f02f0f8e1fa3d5cd2df5e.zip
fix ledger-iso-date-regex, abusing its name slightly
the year field in dates is sort-of optional, given "year" or "Y" directives. Make the date regex understand this. (This has been lightly tested with C-c C-a, but the rest of the uses of ledger-iso-date-regex have only been eyeballed, not properly audited or tested)
-rw-r--r--lisp/ledger-regex.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/ledger-regex.el b/lisp/ledger-regex.el
index 3b43172d..91344523 100644
--- a/lisp/ledger-regex.el
+++ b/lisp/ledger-regex.el
@@ -178,8 +178,8 @@
(ledger-define-regexp iso-date
( let ((sep '(or ?- ?/)))
(rx (group
- (and (group (? (= 4 num)))
- (eval sep)
+ (and (? (and (group (= 4 num)))
+ (eval sep))
(group (and num (? num)))
(eval sep)
(group (and num (? num)))))))