diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2019-04-22 18:33:12 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2019-04-22 18:33:12 +0200 |
commit | 79f7122a66ea7f02c5d0ba128363f0ea35983ba8 (patch) | |
tree | 20a247315ba6c42fe096c25a85c4fd36d7998caa /module/srfi/srfi-19 | |
parent | Limit HTML output to single week. (diff) | |
download | calp-79f7122a66ea7f02c5d0ba128363f0ea35983ba8.tar.gz calp-79f7122a66ea7f02c5d0ba128363f0ea35983ba8.tar.xz |
General cleanup.
Diffstat (limited to '')
-rw-r--r-- | module/srfi/srfi-19/util.scm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/module/srfi/srfi-19/util.scm b/module/srfi/srfi-19/util.scm index f9453820..551f5a12 100644 --- a/module/srfi/srfi-19/util.scm +++ b/module/srfi/srfi-19/util.scm @@ -54,6 +54,8 @@ attribute set to 0. Can also be seen as \"Start of day\"" (define* (time->string time #:optional (format "~1 ~3")) (date->string (time-utc->date time) format)) +;; TODO these ({add,remove}-day} might have problem moving between timezones. + (define (add-day time) (add-duration time (make-duration (* 60 60 24)))) @@ -99,14 +101,13 @@ attribute set to 0. Can also be seen as \"Start of day\"" (lambda (d) (set! (day d) (1+ (day d))) (normalize-date d)) - start-day)) + (#; drop-time identity start-day + ))) (define-public (in-date-range? start-date end-date) (format (current-error-port) "Start: ~a~%End: ~a~%" (date->string start-date) (date->string end-date)) (lambda (date) - (format (current-error-port) "Date: ~a~%" - (date->string date "~1")) (let ((time (date->time-utc date))) (timespan-overlaps? (date->time-utc start-date) (date->time-utc end-date) |