aboutsummaryrefslogtreecommitdiff
path: root/module/datetime
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-05-23 21:46:05 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-05-23 21:46:05 +0200
commit4ba8a8894f0a63e0d3e96df38c3c4d5dab5b737c (patch)
tree3b04c18d026fa2505f49ab88eebca4ccc92a1526 /module/datetime
parentAdd tests for with-replaced-attrs. (diff)
downloadcalp-4ba8a8894f0a63e0d3e96df38c3c4d5dab5b737c.tar.gz
calp-4ba8a8894f0a63e0d3e96df38c3c4d5dab5b737c.tar.xz
Slight changes to define-config.
Diffstat (limited to 'module/datetime')
-rw-r--r--module/datetime/util.scm10
1 files changed, 4 insertions, 6 deletions
diff --git a/module/datetime/util.scm b/module/datetime/util.scm
index a4ac8bcc..4f461591 100644
--- a/module/datetime/util.scm
+++ b/module/datetime/util.scm
@@ -101,14 +101,12 @@
)
+(define-public week-start (make-parameter sun))
+
(define-config week-start sun
"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))
+ pre: (lambda (x) (<= sun x sat))
+ post: week-start)
;; given a date, returns the date the first week of that year starts on.
;; @example