aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-04-25 21:16:56 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-04-25 21:16:56 +0200
commit99fbf6dcf0c5af1232d1729cff7cf14ee132d763 (patch)
tree0dd5b99c6ebb23d698e7157bb2f0a55e31c8f0d0
parentAdd comments in vcomponent/parse. (diff)
downloadcalp-99fbf6dcf0c5af1232d1729cff7cf14ee132d763.tar.gz
calp-99fbf6dcf0c5af1232d1729cff7cf14ee132d763.tar.xz
Remove previous-week-start.
-rw-r--r--module/datetime/util.scm12
-rw-r--r--module/entry-points/html.scm2
2 files changed, 1 insertions, 13 deletions
diff --git a/module/datetime/util.scm b/module/datetime/util.scm
index 99a07bd8..a8ccda07 100644
--- a/module/datetime/util.scm
+++ b/module/datetime/util.scm
@@ -90,18 +90,6 @@
(zeller J K (month date) (day date)))))
-
-;; Given a date, returns the earliest start of week going backwards from that date.
-;; sön 22 mar 2020 20:09:57 CET
-;; @example
-;; (previous-week-start #2020-03-22 mon)
-;; => 2020-03-16
-(define-public (previous-week-start date* week-start)
- ((@ (srfi srfi-41 util) stream-find)
- (lambda (d) (= week-start (week-day d)))
- ((@ (srfi srfi-41) stream-iterate) (cut date- <> (date day: 1))
- date*)))
-
(define-many define-public
(sun) 0
(mon) 1
diff --git a/module/entry-points/html.scm b/module/entry-points/html.scm
index 18b1c0ea..70fbde42 100644
--- a/module/entry-points/html.scm
+++ b/module/entry-points/html.scm
@@ -47,7 +47,7 @@
;; be a good idea to instead center it on the current week, meaning
;; that the active row is always in the center
(html-chunked-main count calendars events
- (previous-week-start start (get-config 'week-start))
+ (start-of-week start (get-config 'week-start))
(date day: 7))]
[(table)
(html-table-main count calendars events start)]