Created
August 28, 2019 16:18
-
-
Save philnguyen/6846a534da7d27d576a65e9dc4e8b544 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(require soft-contract/fake-contract) | |
(struct tzgap (starts-at offset-before offset-after) #:transparent) | |
(struct tzoffset (utc-seconds dst? abbreviation) #:transparent) | |
(struct tzoverlap (offset-before offset-after) #:transparent) | |
(define tz? (or/c string? exact-integer?)) | |
(define system-tzid #:opaque) | |
(define local-seconds->tzoffset #:opaque) | |
(define utc-seconds->tzoffset #:opaque) | |
(provide | |
(contract-out | |
[system-tzid (-> (or/c #f tz?))] | |
[struct tzgap ([starts-at exact-nonnegative-integer?] | |
[offset-before tzoffset?] | |
[offset-after tzoffset?])] | |
[struct tzoffset ([utc-seconds exact-integer?] | |
[dst? boolean?] | |
[abbreviation string?])] | |
[struct tzoverlap ([offset-before tzoffset?] | |
[offset-after tzoffset?])] | |
[local-seconds->tzoffset (-> string? exact-integer? (or/c tzoffset? tzgap? tzoverlap?))] | |
[utc-seconds->tzoffset (-> string? (and/c rational? exact?) tzoffset?)])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment