Changeset 38291 in project


Ignore:
Timestamp:
03/17/20 06:20:38 (3 weeks ago)
Author:
Kon Lovett
Message:

move time? & date? to -time & -date modules, pithy rename literal form parameters

Location:
release/5/srfi-19/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • release/5/srfi-19/trunk/srfi-19-date.scm

    r38290 r38291  
    4040  current-modified-julian-day
    4141  make-date
     42  date? check-date error-date
    4243  date-nanosecond
    4344  date-second
     
    202203    (tm:make-date ns sec min hr dy mn yr tzo tzn dstf #f #f #f) ) )
    203204
     205(define (date? obj)
     206  (tm:date? obj) )
     207
    204208(define (copy-date dat)
    205209  (tm:copy-date (check-date 'copy-date dat)) )
  • release/5/srfi-19/trunk/srfi-19-literals.scm

    r38290 r38291  
    66
    77(;export
     8  date-literal-form
     9  time-literal-form
     10  read-date-literal
     11  write-date-literal
     12  ;DEPERECATED
    813  date-record-printer-format
    9   time-record-printer-format
    10   read-date-literal
    11   write-date-literal)
     14  time-record-printer-format)
    1215
    1316(import scheme)
    1417(import (chicken base))
     18(import (chicken type))
    1519(import (chicken module))
    1620(import srfi-19-tm)
     
    2125;;; Date Literal Syntax
    2226
    23 (define date-record-printer-format
     27(define date-literal-form
    2428  (make-parameter #t
    2529    (lambda (x)
     
    3539          '|#@|)
    3640        (else
    37           (warning 'date-record-printer-format "invalid format" x)
    38           (date-record-printer-format) ) ) ) ) )
     41          (warning 'date-literal-form "invalid format" x)
     42          (date-literal-form) ) ) ) ) )
    3943
    4044;;
     
    7175
    7276(define (date-record-printer-format-string)
    73   (case (date-record-printer-format)
     77  (case (date-literal-form)
    7478    ((SRFI-10)
    7579      DATE-FORMAT-SRFI-10 )
     
    164168(define-constant TIME-FORMAT-LITERAL "##~S_~S_~S")
    165169
    166 (define time-record-printer-format
     170(define time-literal-form
    167171  (make-parameter 'SRFI-10
    168172    (lambda (x)
     
    179183          '|##|)
    180184        (else
    181           (warning 'time-record-printer-format "invalid format" x)
    182           (time-record-printer-format) ) ) ) ) )
     185          (warning 'time-literal-form "invalid format" x)
     186          (time-literal-form) ) ) ) ) )
    183187
    184188(define (bracket-time-literals)
     
    205209
    206210(define (time-record-printer-format-string)
    207   (case (time-record-printer-format)
     211  (case (time-literal-form)
    208212    ((srfi-10 SRFI-10)
    209213      TIME-FORMAT-SRFI-10 )
     
    217221    (tm:time-second tim)) )
    218222
     223;;;
     224
     225(: date-record-printer-format (deprecated date-literal-form))
     226(: time-record-printer-format (deprecated time-literal-form))
     227
     228(define date-record-printer-format date-literal-form)
     229(define time-record-printer-format time-literal-form)
     230
    219231) ;module srfi-19-literals
  • release/5/srfi-19/trunk/srfi-19-support.scm

    r38286 r38291  
    6363(;export
    6464  ;;Public
    65   time? check-time error-time
     65  check-time error-time
    6666  time-type? check-time-type error-time-type
    6767  time-seconds? check-time-seconds error-time-seconds
    6868  time-nanoseconds? check-time-nanoseconds error-time-nanoseconds
    6969  clock-type? check-clock-type error-clock-type
    70   date? check-date error-date
     70  check-date error-date
    7171  date-nanoseconds? check-date-nanoseconds error-date-nanoseconds
    7272  date-seconds? check-date-seconds error-date-seconds
     
    114114;;; Time Object
    115115
    116 (define (time? obj)
    117   (tm:time? obj) )
    118 
    119116;; Time to Date
    120117
     
    189186
    190187;;; Date Object
    191 
    192 (define (date? obj)
    193   (tm:date? obj) )
    194188
    195189;;
  • release/5/srfi-19/trunk/srfi-19-time.scm

    r38290 r38291  
    4242  time-resolution
    4343  make-time
     44  time? check-time error-time
    4445  time-type
    4546  time-nanosecond
     
    134135  (tm:make-time tt ns sec) )
    135136
     137(define (time? obj)
     138  (tm:time? obj) )
     139
    136140(define (make-duration
    137141          #!key (days 0)
Note: See TracChangeset for help on using the changeset viewer.