aboutsummaryrefslogtreecommitdiff
path: root/module/entry-points
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2020-01-24 20:21:41 +0100
committerHugo Hörnquist <hugo@hornquist.se>2020-01-24 20:23:04 +0100
commite822f7b81245c919eda8bd8ad4b482df075e0508 (patch)
tree3024a9a1a80e5c9ffd6d187a028c783dc4b7abbd /module/entry-points
parentExtend define-many to allow a custom define procedure. (diff)
downloadcalp-e822f7b81245c919eda8bd8ad4b482df075e0508.tar.gz
calp-e822f7b81245c919eda8bd8ad4b482df075e0508.tar.xz
Start of new date structures.
Diffstat (limited to 'module/entry-points')
-rw-r--r--module/entry-points/ical.scm8
-rw-r--r--module/entry-points/terminal.scm9
2 files changed, 9 insertions, 8 deletions
diff --git a/module/entry-points/ical.scm b/module/entry-points/ical.scm
index 87b4a6fe..375613a3 100644
--- a/module/entry-points/ical.scm
+++ b/module/entry-points/ical.scm
@@ -5,8 +5,8 @@
:use-module ((vcomponent) :select (load-calendars*))
:use-module ((parameters) :select (calendar-files))
:use-module (ice-9 getopt-long)
- :use-module (srfi srfi-19)
- :use-module (srfi srfi-19 util)
+ :use-module (srfi srfi-19 alt)
+ :use-module (srfi srfi-19 alt util)
)
(define opt-spec
@@ -20,7 +20,9 @@
(define start (cond [(option-ref opts 'from #f) => parse-freeform-date]
[else (start-of-month (current-date))]))
(define end (cond [(option-ref opts 'to #f) => parse-freeform-date]
- [else (normalize-date* (set (date-month start) = (+ 1)))]))
+ ;; [else (normalize-date* (set (month start) = (+ 1)))]
+ [(date+ start (date month: 1))]
+ ))
;; TODO this contains repeated events multiple times
(define-values (calendars regular repeating)
diff --git a/module/entry-points/terminal.scm b/module/entry-points/terminal.scm
index 45f9b8eb..df15116c 100644
--- a/module/entry-points/terminal.scm
+++ b/module/entry-points/terminal.scm
@@ -3,8 +3,8 @@
:use-module (output terminal)
:use-module (vcomponent)
:use-module (ice-9 getopt-long)
- :use-module (srfi srfi-19)
- :use-module (srfi srfi-19 util)
+ :use-module (srfi srfi-19 alt)
+ :use-module (srfi srfi-19 alt util)
:use-module (parameters)
:use-module (vulgar)
)
@@ -20,9 +20,8 @@
calendar-files: (cond [(option-ref opts 'file #f) => list]
[else (calendar-files)]) ))
- (let ((time (date->time-utc
- (drop-time (or (and=> (option-ref opts 'date #f) parse-freeform-date)
- (current-date))))))
+ (let ((time (drop-time (or (and=> (option-ref opts 'date #f) parse-freeform-date)
+ (current-date)))))
;; (format (current-error-port) "len(events) = ~a~%" (stream-length events))
(with-vulgar
(lambda () (main-loop time events))))