From 392bca3614fdef2e2fc23baca3e86ba46b2a5b81 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 26 Sep 2023 10:32:59 +0100 Subject: Add date constructor. * rent.scm (date): New function. --- rent.scm | 4 ++++ 1 file changed, 4 insertions(+) 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{} 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 -- cgit v1.2.3