mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-28 20:31:03 +00:00
org-clock.el: add semimonth step for clocktables
* lisp/org-clock.el (org-clocktable-steps): Add a semimonth step for producing clock tables. Originally proposed "bimonth" as name; however, bimonthly is ambiguous, as it can mean 2 different things, semimonthly or every 2 months. TINYCHANGE
This commit is contained in:
parent
7a78eb1be0
commit
8a99404c84
|
@ -2784,6 +2784,7 @@ a number of clock tables."
|
|||
(pcase step
|
||||
(`day "Daily report: ")
|
||||
(`week "Weekly report starting on: ")
|
||||
(`semimonth "Semimonthly report starting on: ")
|
||||
(`month "Monthly report starting on: ")
|
||||
(`year "Annual report starting on: ")
|
||||
(_ (user-error "Unknown `:step' specification: %S" step))))
|
||||
|
@ -2833,6 +2834,9 @@ a number of clock tables."
|
|||
(let ((offset (if (= dow week-start) 7
|
||||
(mod (- week-start dow) 7))))
|
||||
(list 0 0 org-extend-today-until (+ d offset) m y)))
|
||||
(`semimonth (list 0 0 0
|
||||
(if (< d 16) 16 1)
|
||||
(if (< d 16) m (1+ m)) y))
|
||||
(`month (list 0 0 0 month-start (1+ m) y))
|
||||
(`year (list 0 0 org-extend-today-until 1 1 (1+ y)))))))
|
||||
(table-begin (line-beginning-position 0))
|
||||
|
|
Loading…
Reference in a new issue