diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-04-05 16:43:56 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-04-05 16:56:14 +0200 |
commit | cdff1a3fb0743936a138253202c8aec99bccca6d (patch) | |
tree | 5cd99c74a7605e6663cf9cbd9130fd163d43a70d /module/datetime.scm | |
parent | with-vulgar now uses alternative screen. (diff) | |
download | calp-cdff1a3fb0743936a138253202c8aec99bccca6d.tar.gz calp-cdff1a3fb0743936a138253202c8aec99bccca6d.tar.xz |
Minor fixups.
Diffstat (limited to 'module/datetime.scm')
-rw-r--r-- | module/datetime.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/module/datetime.scm b/module/datetime.scm index 18c965ff..478fc479 100644 --- a/module/datetime.scm +++ b/module/datetime.scm @@ -65,6 +65,11 @@ (year year) (month month) (day day)) (define*-public (date key: (year 0) (month 0) (day 0)) + (unless (and (integer? year) (integer? month) (integer? day)) + (scm-error 'wrong-type-arg "date" + "Year, month, and day must all be integers. ~s, ~s, ~s" + (list year month day) + #f)) (make-date year month day)) (set-record-type-printer! @@ -72,7 +77,7 @@ (lambda (r p) (catch 'misc-error (lambda () (display (date->string r "#~Y-~m-~d") p)) - (lambda (err _ fmt args . rest) + (lambda (err proc fmt args data) (format p "#<<date> BAD year=~s month=~s day=~s>" (year r) (month r) (day r)))))) |