emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christian Hopps <chopps@chopps.org>
To: emacs-orgmode@gnu.org
Cc: chopps@chopps.org
Subject: [PATCH] Add semimonth step for clocktables
Date: Fri, 20 Mar 2020 07:35:25 -0400	[thread overview]
Message-ID: <sa68sjvfede.fsf@stubbs.int.chopps.org> (raw)

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


From 25818bb40620311d7bb497320acafc175c9f4276 Mon Sep 17 00:00:00 2001
From: Christian Hopps <chopps@gmail.com>
Date: Fri, 20 Mar 2020 06:58:29 -0400

---
 lisp/org-clock.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 345fd9b5a..c902635f9 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -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))
--
2.25.0

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

             reply	other threads:[~2020-03-20 11:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-20 11:35 Christian Hopps [this message]
2020-03-26  3:36 ` [PATCH] Add semimonth step for clocktables Kyle Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sa68sjvfede.fsf@stubbs.int.chopps.org \
    --to=chopps@chopps.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).