emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bi-monthly steps.


From: Christian Hopps
Subject: bi-monthly steps.
Date: Thu, 12 Mar 2020 07:17:59 -0400
User-agent: mu4e 1.3.5; emacs 26.3



I've the need to display bimonthly clock tables, I was able to add this pretty 
easy in case the project would find it useful

--- org-clock.el        2020-03-12 06:52:14.000000000 -0400
+++ /Users/chopps/org-clock.el  2020-03-12 06:51:43.000000000 -0400
@@ -2719,6 +2719,7 @@
          (pcase step
            (`day "Daily report: ")
            (`week "Weekly report starting on: ")
+            (`bimonth "Bi-Monthly report starting on: ")
            (`month "Monthly report starting on: ")
            (`year "Annual report starting on: ")
            (_ (user-error "Unknown `:step' specification: %S" step))))
@@ -2768,6 +2769,7 @@
                          (let ((offset (if (= dow week-start) 7
                                          (mod (- week-start dow) 7))))
                            (list 0 0 org-extend-today-until (+ d offset) m y)))
+                         (`bimonth (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))

Thanks,
Chris.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]