summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Keegan <dksw@eircom.net>2013-03-09 18:39:30 +0000
committerDavid Keegan <dksw@eircom.net>2013-03-09 18:39:30 +0000
commit13b4c5adc000ca17c03a7d412f6e0a12a0f35e74 (patch)
tree10446470bd98b33078d296160acbcc151f744430
parentbfe360d4c992caf2e7da09ab058599c0404f1348 (diff)
downloadfork-ledger-13b4c5adc000ca17c03a7d412f6e0a12a0f35e74.tar.gz
fork-ledger-13b4c5adc000ca17c03a7d412f6e0a12a0f35e74.tar.bz2
fork-ledger-13b4c5adc000ca17c03a7d412f6e0a12a0f35e74.zip
Fixed bug 913 ledger mode C-c C-a and ISO dates.
-rw-r--r--lisp/ldg-mode.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/ldg-mode.el b/lisp/ldg-mode.el
index 84ccf62b..97662aa3 100644
--- a/lisp/ldg-mode.el
+++ b/lisp/ldg-mode.el
@@ -167,8 +167,8 @@ MOMENT is an encoded date"
(while (not (eobp))
(when (looking-at
(concat "\\(Y\\s-+\\([0-9]+\\)\\|"
- "\\([0-9]\\{4\\}+\\)?[./]?"
- "\\([0-9]+\\)[./]\\([0-9]+\\)\\s-+"
+ "\\([0-9]\\{4\\}+\\)?[./-]?"
+ "\\([0-9]+\\)[./-]\\([0-9]+\\)\\s-+"
"\\(\\*\\s-+\\)?\\(.+\\)\\)"))
(let ((found (match-string 2)))
(if found
@@ -215,7 +215,7 @@ correct chronological place in the buffer."
exit-code)
(unless insert-at-point
(let ((date (car args)))
- (if (string-match "\\([0-9]+\\)/\\([0-9]+\\)/\\([0-9]+\\)" date)
+ (if (string-match "\\([0-9]+\\)[-/]\\([0-9]+\\)[-/]\\([0-9]+\\)" date)
(setq date
(encode-time 0 0 0 (string-to-number (match-string 3 date))
(string-to-number (match-string 2 date))