summaryrefslogtreecommitdiff
path: root/ledger-regex.el
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
commit52a24b9f9169b1a34e1823d166e2f273d13c49e7 (patch)
treee331c51653e8d734679a2739b0396aa931924b05 /ledger-regex.el
parent9e0fdf18e9afa5992e075837602f70c5f3068d56 (diff)
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)
Diffstat (limited to 'ledger-regex.el')
-rw-r--r--ledger-regex.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/ledger-regex.el b/ledger-regex.el
index 3b43172..9134452 100644
--- a/ledger-regex.el
+++ b/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)))))))