#lang scheme/base
(require (prefix-in s: "srfi.ss")
"convert.ss"
(rename-in (only-in "date.ss" current-local-tz-offset)
(current-local-tz-offset offset))
(only-in "depend.ss" provide/strip-prefix
provide/contract ->)
scheme/contract
(for-syntax scheme/base)
)
(define-plt-date*
(current-date (tz (offset)))
(date->julian-day #:any! (d :date))
(date->modified-julian-day #:any! (d :date))
(julian-day->date jd)
(modified-julian-day->date mjd)
(date->time-monotonic #:any! (d :date))
(date->time-tai #:any! (d :date))
(date->time-utc #:any! (d :date))
(time-monotonic->date t (tz (offset)))
(time-tai->date t (tz (offset)))
(time-utc->date t (tz (offset)))
(date->string #:any! (d :date) (format "~c"))
(string->date str template)
(build-date y m d (hh 0) (mm 0) (ss 0) (nano 0) #:tz (tz 0))
(date+ (date :date) days)
(date- #:any! (d1 :date) (d2 :date))
(date>? #:any! (d1 :date) (d2 :date) #:rest (dates :date))
(date<? #:any! (d1 :date) (d2 :date) #:rest (dates :date))
(date=? #:any! (d1 :date) (d2 :date) #:rest (dates :date))
(date>=? #:any! (d1 :date) (d2 :date) #:rest (dates :date))
(date<=? #:any! (d1 :date) (d2 :date) #:rest (dates :date))
(date!=? #:any! (d1 :date) (d2 :date) #:rest (dates :date))
(day>? #:any! (d1 :date) (d2 :date) #:rest (dates :date))
(day<? #:any! (d1 :date) (d2 :date) #:rest (dates :date))
(day=? #:any! (d1 :date) (d2 :date) #:rest (dates :date))
(day>=? #:any! (d1 :date) (d2 :date) #:rest (dates :date))
(day<=? #:any! (d1 :date) (d2 :date) #:rest (dates :date))
(day!=? #:any! (d1 :date) (d2 :date) #:rest (dates :date))
(date===? #:any! (d1 :date) (d2 :date) #:rest (dates :date))
(date->seconds #:any! (d :date))
(date->alarm #:any! (d :date))
(date->future-alarm #:any! (d :date))
(read-rfc822 s)
(date->rfc822 #:any! (d :date))
(read-iso8601 s)
(date->iso8601 #:any! (d :date))
(nth-week-day y m wday nth (hh 0) (mm 0) (ss 0) #:tz (tz 0))
(week-day>=mday y m wday mday (hh 0) (mm 0) (ss 0) #:tz (tz 0))
(week-day>mday y m wday mday (hh 0) (mm 0) (ss 0) #:tz (tz 0))
(week-day<=mday y m wday mday (hh 0) (mm 0) (ss 0) #:tz (tz 0))
(week-day<mday y m wday mday (hh 0) (mm 0) (ss 0) #:tz (tz 0))
)
(provide/strip-prefix s:
time-duration
time-monotonic
time-process
time-tai
time-thread
time-utc
time?
make-time
time-type
time-nanosecond
time-second
time-resolution
set-time-type!
set-time-second!
set-time-nanosecond!
copy-time
time<=?
time<?
time=?
time>=?
time>?
time-difference
time-difference!
add-duration
add-duration!
subtract-duration
subtract-duration!
julian-day->time-monotonic
julian-day->time-tai
julian-day->time-utc
modified-julian-day->time-monotonic
modified-julian-day->time-tai
modified-julian-day->time-utc
time-monotonic->julian-day
time-monotonic->modified-julian-day
time-monotonic->time-tai
time-monotonic->time-tai!
time-monotonic->time-utc
time-monotonic->time-utc!
time-tai->julian-day
time-tai->modified-julian-day
time-tai->time-monotonic
time-tai->time-utc
time-tai->time-monotonic!
time-tai->time-utc!
time-utc->julian-day
time-utc->modified-julian-day
time-utc->time-monotonic
time-utc->time-tai
time-utc->time-monotonic!
time-utc->time-tai!
leap-year?
week-day
year-day
normalize-year/month/day
month->num
weekday->num
current-local-tz-offset
date-comp-type
)
(define (date-nanosecond d) 0)
(provide/contract
(date-nanosecond (-> date? number?)))
(provide (rename-out (date-time-zone-offset date-zone-offset)))