From 5b5ec937612e63c6d22bac30c37a8e502e645e5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 19 May 2020 22:20:41 +0200 Subject: Remove leap and expiry from zic. --- module/datetime/zic.scm | 41 +++++------------------------------------ 1 file changed, 5 insertions(+), 36 deletions(-) (limited to 'module/datetime/zic.scm') diff --git a/module/datetime/zic.scm b/module/datetime/zic.scm index 02f3230f..1f599ca6 100644 --- a/module/datetime/zic.scm +++ b/module/datetime/zic.scm @@ -119,13 +119,6 @@ (name link-name) ; string (target link-target)) ; string -(define-immutable-record-type ; "UNUSED" - (make-leap-second when correction r/s) - leap-second? - (when leap-second-when) - (correction leap-second-correction) - (r/s leap-second-r/s)) - (define-immutable-record-type ; EXPORTED (make-zoneinfo rules zones) zoneinfo? @@ -329,36 +322,12 @@ (loop (cons (make-link name target) done) #f))] - ;; Leap and Exprires mostly ignored - - [(Leap) - (let* (((year month day time correction r/s) args)) - (loop (cons - (make-leap-second - (datetime - date: (date year: (string->number year) - month: (month-name->number month) - day: (string->number day)) - time: (parse-iso-time time)) - correction - (cond - [(string-prefix? r/s "Stationary") 'stationary] - [(string-prefix? r/s "Rolling") 'rolling] - [else (error "Invalid r/s" r/s)])) - done) #f))] - - [(Expires) - (let* (((year month day time) args)) - ;; TODO class here - (loop - (cons (datetime - date: (date year: (string->number year) - month: (month-name->number month) - day: (string->number day)) - time: (parse-iso-time time)) - done) #f))] [else - (error "Something")] + ;; NOTE an earlier version of the code the parsers for those. + ;; They were removed since they were unused, uneeded, and was + ;; technical dept. + (error "Invalid key ~a. Note that leap seconds and +expries rules aren't yet implemented." type)] ))])))))) -- cgit v1.2.3