plt.ss
#lang scheme/base
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; DATE-TZ.plt - provides time-zone-based date calculations
;;
;; Bonzai Lab, LLC.  All rights reserved.
;;
;; released under LGPL.
;;
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; plt.ss - adding binding to convert srfi/19 dates to plt dates for date-tz functions.
;; yc 10/7/2009 - first version
;; yc 10/19/2009 - use depend.ss for centralized dependency

(require (only-in "depend.ss" define-plt-date*) 
         (prefix-in s: "tz.ss")
         (only-in "util.ss" tz-names)
         (only-in "tz.ss" current-tz)
         )

(provide current-tz
         tz-names
         )

(define-plt-date* 
  (tz-daylight-saving-offset #:any! (d :date) (tz (current-tz)))
  (tz-standard-offset #:any! (d :date) (tz (current-tz)))
  (tz-offset #:any! (d :date) (tz (current-tz)))
  (tz-abbr #:any! (d :date) (tz (current-tz)))
  (date->tz (d :date) (tz (current-tz)))
  (tz-convert (d :date) from to)
  (date+/tz (d :date) days (tz (current-tz)))
  (build-date/tz y m d (hh 0) (mm 0) (ss 0) (nano 0) #:tz (tz (current-tz)))
  (current-date/tz (tz (current-tz)))
  (daylight-saving-time? #:any! (d :date (current-date/tz)) (tz (current-tz)))
  )