aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--module/datetime/util.scm3
-rw-r--r--module/entry-points/server.scm4
2 files changed, 5 insertions, 2 deletions
diff --git a/module/datetime/util.scm b/module/datetime/util.scm
index ed954b43..7f0ffb1f 100644
--- a/module/datetime/util.scm
+++ b/module/datetime/util.scm
@@ -105,6 +105,9 @@
"First day of week"
(lambda (x) (<= sun x sat)))
+;; TODO setting the @var{week-start} parameter from the @var{week-start}
+;; config ought to be done. But a post-set method first needs to be
+;; introduced in define-config.
(define-public week-start (make-parameter sun))
;; given a date, returns the date the first week of that year starts on.
diff --git a/module/entry-points/server.scm b/module/entry-points/server.scm
index 6fb2b6b5..c137a144 100644
--- a/module/entry-points/server.scm
+++ b/module/entry-points/server.scm
@@ -101,8 +101,8 @@
prev-start: month-
;; internally rounds start-date to start of month
render-calendar: render-calendar-table
- pre-start: (start-of-week start-date)
- post-end: (end-of-week (end-of-month start-date))
+ pre-start: (start-of-week start-date (get-config 'week-start))
+ post-end: (end-of-week (end-of-month start-date) (get-config 'week-start))
intervaltype: 'month
))))))