From e822f7b81245c919eda8bd8ad4b482df075e0508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Fri, 24 Jan 2020 20:21:41 +0100 Subject: Start of new date structures. --- module/entry-points/ical.scm | 8 +++++--- module/entry-points/terminal.scm | 9 ++++----- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'module/entry-points') 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)))) -- cgit v1.2.3