[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Add semimonth step for clocktables
From: |
Christian Hopps |
Subject: |
[PATCH] Add semimonth step for clocktables |
Date: |
Fri, 20 Mar 2020 07:35:25 -0400 |
User-agent: |
mu4e 1.3.5; emacs 26.3 |
From 25818bb40620311d7bb497320acafc175c9f4276 Mon Sep 17 00:00:00 2001
From: Christian Hopps <address@hidden>
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
signature.asc
Description: PGP signature
- [PATCH] Add semimonth step for clocktables,
Christian Hopps <=