aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2023-09-26 10:32:59 +0100
committerArun Isaac2023-09-26 10:34:10 +0100
commit392bca3614fdef2e2fc23baca3e86ba46b2a5b81 (patch)
tree84d955ce2cdc68792dc84b3269b2fa9d0c76a08c
parentdaf0cbf0df354753382b43c5ca21275a4722761a (diff)
downloadrent-in-london-392bca3614fdef2e2fc23baca3e86ba46b2a5b81.tar.gz
rent-in-london-392bca3614fdef2e2fc23baca3e86ba46b2a5b81.tar.lz
rent-in-london-392bca3614fdef2e2fc23baca3e86ba46b2a5b81.zip
Add date constructor.
* rent.scm (date): New function.
-rw-r--r--rent.scm4
1 files changed, 4 insertions, 0 deletions
diff --git a/rent.scm b/rent.scm
index 4d4855e..db047b7 100644
--- a/rent.scm
+++ b/rent.scm
@@ -148,6 +148,10 @@ somewhere in @var{html}, a string."
@code{#f} if @var{n} is 0 and @code{#t} otherwise."
(not (zero? n)))
+(define* (date day month #:optional (year (date-year (current-date))))
+ "Construct a @code{<date>} object."
+ (make-date 0 0 0 0 day month year (date-zone-offset (current-date))))
+
(define (date+ date days)
"Add @var{days} number of days to @var{date}."
(time-utc->date