aboutsummaryrefslogtreecommitdiff
path: root/srfi
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-03-08 13:31:41 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-03-08 13:31:41 +0100
commitbbd1e2bc4b331acd9a4062569777411c21061232 (patch)
treeb384f25a3b8c76315626c083f655e5971a88dcec /srfi
parentFix main. (diff)
downloadcalp-bbd1e2bc4b331acd9a4062569777411c21061232.tar.gz
calp-bbd1e2bc4b331acd9a4062569777411c21061232.tar.xz
Clean up srfi-19 util.
Diffstat (limited to 'srfi')
-rw-r--r--srfi/srfi-19/util.scm34
1 files changed, 0 insertions, 34 deletions
diff --git a/srfi/srfi-19/util.scm b/srfi/srfi-19/util.scm
index 05deb39b..2d709d55 100644
--- a/srfi/srfi-19/util.scm
+++ b/srfi/srfi-19/util.scm
@@ -4,11 +4,8 @@
#:use-module (srfi srfi-19 setters)
#:export (copy-date
drop-time! drop-time
- localize-date
- ;; date-today?
today?
seconds minutes hours days weeks
- date-add
time-add
time->string))
@@ -30,9 +27,6 @@
(define (drop-time date)
"Returns a copy of date; with the hour, minute, second and nanosecond
attribute set to 0."
- #;
- (let ((new-date (copy-date date))) ;
- (drop-time! new-date))
(set-fields date
((date-hour) 0)
((date-minute) 0)
@@ -40,19 +34,6 @@ attribute set to 0."
((date-nanosecond) 0)))
-#;
-(define (%date<=? a b)
- (time<=? (date->time-utc a)
- (date->time-utc b)))
-
-#;
-(define (localize-date date)
- "Returns a <date> object representing the same datetime as `date`, but
-transposed to the current timezone. Current timezone gotten from
-(current-date)."
- (time-utc->date (date->time-utc date)
- (date-zone-offset (current-date))))
-
(define seconds 1)
(define minutes 60)
(define hours (* 60 minutes))
@@ -68,20 +49,5 @@ transposed to the current timezone. Current timezone gotten from
(and (time<=? now time)
(time<=? time then))))
- #;
-(define (date-today? input-date)
- (let* ((date (current-date))
- (now (drop-time date))
- (then (copy-date now)))
- (set! (day then)
- (1+ (day then)))
- (and (%date<=? now input-date)
- (%date<=? input-date then))))
-
-#;
-(define (date-add date amount unit)
- (time-utc->date (add-duration (date->time-utc date)
- (make-time time-duration 0 (* amount unit)))))
-
(define* (time->string time #:optional (format "~c"))
(date->string (time-utc->date time) format))