From 8ed06c632b0113e104584556f222be46e8a70de8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Fri, 14 Feb 2020 00:28:37 +0100 Subject: Minor cleanup. --- module/output/html.scm | 13 ++++--------- module/srfi/srfi-19/alt.scm | 1 + 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'module') diff --git a/module/output/html.scm b/module/output/html.scm index 5e721a4e..b016d977 100644 --- a/module/output/html.scm +++ b/module/output/html.scm @@ -123,10 +123,7 @@ (datetime-difference (attr ev 'DTEND) (attr ev 'DTSTART))))) (stream->list events)))) - ;; (format (current-error-port) "lay-out-day: ~a~%" (date->string date)) - (format (current-error-port) "long=~a, short=~a~%" - (length long-events) - (length short-events)) + (fix-event-widths! date short-events) (fix-event-widths! date long-events) `(div (@ (class "day")) @@ -203,7 +200,6 @@ ;; Single event in side bar (text objects) (define (fmt-day day) (let* (((date . events) day)) - ;; (format (current-error-port) "fmt-day: ~a~%" (date->string date)) `(section (@ (class "text-day")) (header (h2 ,(let ((s (date->string date "~Y-~m-~d"))) `(a (@ (href "#" ,s) @@ -221,9 +217,7 @@ events)))))) (define* (month+ date-object #:optional (change 1)) - ;; (normalize-date* (set (date-month date) = (+ change))) - (date+ date-object (date month: change)) - ) + (date+ date-object (date month: change))) (define* (month- date-object #:optional (change 1)) (date- date-object (date month: change))) @@ -280,10 +274,11 @@ ;;; All this filtering is probably slow, and should be looked into. (define-public (html-generate calendars events start-date end-date) + ;; TODO maybe don't do this again for every month (define evs (get-groups-between (group-stream events) start-date end-date)) - ;; (display "") (newline) + (define (nav-link display date) `(a (@ (href ,(date->string date "~Y-~m-~d") ".html") (class "nav hidelink")) diff --git a/module/srfi/srfi-19/alt.scm b/module/srfi/srfi-19/alt.scm index c07bcbd8..c02cdaf7 100644 --- a/module/srfi/srfi-19/alt.scm +++ b/module/srfi/srfi-19/alt.scm @@ -186,6 +186,7 @@ (and (date<=% first second) (apply date<= second rest))])) +;; TODO TZ (define-public (time< a b) (let ((ah (hour a)) (bh (hour b))) -- cgit v1.2.3