From 7af18cf532514e9b5386287614154ca615d8429c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 11 Aug 2020 16:45:58 +0200 Subject: Remove week-start from (html view calendar) (again?) --- module/html/view/calendar.scm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'module/html/view/calendar.scm') diff --git a/module/html/view/calendar.scm b/module/html/view/calendar.scm index 819441e6..2371cfe0 100644 --- a/module/html/view/calendar.scm +++ b/module/html/view/calendar.scm @@ -36,7 +36,6 @@ ;; 29 30 ;; @end example ;; date - a date in the month to display -;; week-start - which day the week begins on, see (datetime util) (define* (cal-table key: start-date end-date next-start prev-start) (define (td date) @@ -68,17 +67,17 @@ (time (@ (datetime ,(date->string date "~Y-~m-~d"))) ,(day date)))) (let* ((last-months current next - (month-days (start-of-month start-date) week-start)) + (month-days (start-of-month start-date))) (events (append last-months current next))) `(div (@ (class "small-calendar")) (div (@ (class "column-head row-head")) "v.") ,@(map (lambda (d) `(div (@ (class "column-head")) ,(string-titlecase (week-day-name d 2)))) - (weekday-list week-start)) - ,@(let ((first (start-of-week (car events) week-start)) - (last (start-of-week (last events) week-start))) + (weekday-list)) + ,@(let ((first (start-of-week (car events))) + (last (start-of-week (last events)))) (map (lambda (v) `(div (@ (class "row-head")) ,v)) - (map (lambda (d) (week-number d week-start)) + (map (lambda (d) (week-number d)) (stream->list (stream-take-while (lambda (s) (date<= s last)) (week-stream first)))))) -- cgit v1.2.3