emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* bi-monthly steps.
@ 2020-03-12 11:17 Christian Hopps
  2020-03-12 18:15 ` Nick Dokos
  0 siblings, 1 reply; 12+ messages in thread
From: Christian Hopps @ 2020-03-12 11:17 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: chopps

[-- Attachment #1: Type: text/plain, Size: 1177 bytes --]



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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-03-27  8:26 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-12 11:17 bi-monthly steps Christian Hopps
2020-03-12 18:15 ` Nick Dokos
2020-03-12 22:55   ` Christian Hopps
2020-03-13  8:01     ` Michal Politowski
2020-03-13 12:14       ` Peter Neilson
2020-03-26 11:33         ` Christian Hopps
2020-03-27  1:12           ` Kyle Meyer
2020-03-27  8:26             ` Christian Hopps
2020-03-13  4:47   ` Peter Neilson
2020-03-13  6:59     ` Eric S Fraga
2020-03-13  7:14       ` Loris Bennett
2020-03-13  9:51         ` semimonthly steps [Re: bi-monthly steps.] Christian Hopps

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).