blob: 582b8f443b457c79f7c92bc954de945dd2c81e5b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
From fc4306c44b681b6e8f956ebc2740002bdb66d266 Mon Sep 17 00:00:00 2001
From: Maxime Wack <MaximeWack@users.noreply.github.com>
Date: Wed, 3 Feb 2021 12:51:20 +0100
Subject: [PATCH 1/3] Fix cfw:org-get-timerange to display the correct
timerange
From 407b0eb31b1d16532e22316edfba5b0b76f4cd3b Mon Sep 17 00:00:00 2001
From: Maxime Wack <maximewack@free.Fr>
Date: Mon, 7 Jun 2021 00:58:43 +0200
Subject: [PATCH 2/3] Re-use start-date, as permitted by let*
From 6c75fd3acb47f634d0b2c3c591e659c5bae448cc Mon Sep 17 00:00:00 2001
From: Maxime Wack <maximewack@free.Fr>
Date: Mon, 7 Jun 2021 00:59:35 +0200
Subject: [PATCH 3/3] Fix the double displaying of timeranges with times
--- a/calfw-org.el
+++ b/calfw-org.el
@@ -238,14 +238,13 @@
(match-string 1 extra)))
(total-days (string-to-number
(match-string 2 extra)))
- (start-date (time-subtract
- (org-read-date nil t date-string)
- (seconds-to-time (* 3600 24 (- cur-day 1)))))
+ (start-date (org-read-date nil t date-string))
(end-date (time-add
- (org-read-date nil t date-string)
- (seconds-to-time (* 3600 24 (- total-days cur-day))))))
- (list (calendar-gregorian-from-absolute (time-to-days start-date))
- (calendar-gregorian-from-absolute (time-to-days end-date)) text))
+ start-date
+ (seconds-to-time (* 3600 24 (- total-days 1))))))
+ (unless (= cur-day total-days)
+ (list (calendar-gregorian-from-absolute (time-to-days start-date))
+ (calendar-gregorian-from-absolute (time-to-days end-date)) text)))
)))))
(defun cfw:org-schedule-period-to-calendar (begin end)
|