diff options
author | Craig Earls <enderw88@gmail.com> | 2014-11-26 15:56:49 -0700 |
---|---|---|
committer | Craig Earls <enderw88@gmail.com> | 2014-11-26 15:56:49 -0700 |
commit | f398e01c803e79e6314af0baf579ca2d8e6a9646 (patch) | |
tree | 580b774af1dbba56fd0c5a5e03e5cb2a4e44862d /lisp | |
parent | 06bdf1d18a41202e1550dca63d64d6c8f31c7a85 (diff) | |
download | ledger-f398e01c803e79e6314af0baf579ca2d8e6a9646.tar.gz ledger-f398e01c803e79e6314af0baf579ca2d8e6a9646.tar.bz2 ledger-f398e01c803e79e6314af0baf579ca2d8e6a9646.zip |
Handle count day of month, i.e. third Thursday is */*/3Th, every Thursday is */*/0Th
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ledger-schedule.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/ledger-schedule.el b/lisp/ledger-schedule.el index 820fa660..a5e7decb 100644 --- a/lisp/ledger-schedule.el +++ b/lisp/ledger-schedule.el @@ -245,7 +245,11 @@ the transaction should be logged for that day." (string-match "[A-Za-z]" (cadr day-parts))))) (day-of-week (ledger-schedule-encode-day-of-week (substring (cadr day-parts) (string-match "[A-Za-z]" (cadr day-parts)))))) - (ledger-schedule-constrain-every-count-day day-of-week increment (encode-time 0 0 0 base-day (car months) (car years))))))) + (ledger-schedule-constrain-every-count-day day-of-week increment (encode-time 0 0 0 base-day (car months) (car years)))) + (let ((count (string-to-number (substring (car day-parts) 0 1))) + (day-of-week (ledger-schedule-encode-day-of-week + (substring (car day-parts) (string-match "[A-Za-z]" (car day-parts)))))) + (ledger-schedule-constrain-day-in-month count day-of-week))))) (defun ledger-schedule-list-upcoming-xacts (candidate-items early horizon) "Search CANDIDATE-ITEMS for xacts that occur within the period today - EARLY to today + HORIZON" |