aboutsummaryrefslogtreecommitdiff
path: root/module/srfi/srfi-19/alt.scm
diff options
context:
space:
mode:
Diffstat (limited to 'module/srfi/srfi-19/alt.scm')
-rw-r--r--module/srfi/srfi-19/alt.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/module/srfi/srfi-19/alt.scm b/module/srfi/srfi-19/alt.scm
index b3e8a478..ccc58b8f 100644
--- a/module/srfi/srfi-19/alt.scm
+++ b/module/srfi/srfi-19/alt.scm
@@ -35,8 +35,12 @@
(set-record-type-printer!
<date>
(lambda (r p)
- (format p "~4'0d­~2'0d­~2'0d"
- (year r) (month r) (day r))))
+ (if (or (not (integer? (year r)))
+ (not (integer? (month r)))
+ (not (integer? (day r))))
+ (format p "BAD~s-~s-~s" (year r) (month r) (day r))
+ (format p "~4'0d-~2'0d-~2'0d"
+ (year r) (month r) (day r)))))
(define*-public (date key: (year 0) (month 0) (day 0))
(make-date year month day))