Skip to content

Commit 3f3ff64

Browse files
Joost Helbergyantar92
authored andcommitted
org-clock: Make quarter work as parameter for :step in clocktable
Hi, many years ago a colleague and myself wrote a patch for quarters into org-mode/clocktable for blocks, today I noticed that :step should allow 'quarter' as an argument too. Here's the tiny patch to allow that. * doc/org-manual.org (The clock table): Document the new clocktable option. * lisp/org-clock.el: (org-clocktable-steps): Add new 'quarter allowed value. TINYCHANGE
1 parent 7c20552 commit 3f3ff64

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

doc/org-manual.org

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6754,7 +6754,7 @@ be selected:
67546754

67556755
- =:step= ::
67566756

6757-
Set to =day=, =week=, =semimonth=, =month=, or =year= to split the
6757+
Set to =day=, =week=, =semimonth=, =month=, =quarter=, or =year= to split the
67586758
table into chunks. To use this, either =:block=, or =:tstart= and
67596759
=:tend= are required.
67606760

lisp/org-clock.el

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2846,6 +2846,7 @@ a number of clock tables."
28462846
(`semimonth "Semimonthly report starting on: ")
28472847
(`month "Monthly report starting on: ")
28482848
(`year "Annual report starting on: ")
2849+
(`quarter "Quarterly report starting on: ")
28492850
(_ (user-error "Unknown `:step' specification: %S" step))))
28502851
(week-start (or (plist-get params :wstart) 1))
28512852
(month-start (or (plist-get params :mstart) 1))
@@ -2898,6 +2899,7 @@ a number of clock tables."
28982899
(if (< d 16) 16 1)
28992900
(if (< d 16) m (1+ m)) y))
29002901
(`month (org-encode-time 0 0 0 month-start (1+ m) y))
2902+
(`quarter (org-encode-time 0 0 0 month-start (+ 3 m) y))
29012903
(`year (org-encode-time 0 0 org-extend-today-until 1 1 (1+ y))))))
29022904
(table-begin (line-beginning-position 0))
29032905
(step-time

0 commit comments

Comments
 (0)