Changeset 39871 in project


Ignore:
Timestamp:
04/07/21 01:36:07 (5 weeks ago)
Author:
Kon Lovett
Message:

use symbol->keyword, choice is number vs date (fixnum specificity not required)

File:
1 edited

Legend:

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

    r39870 r39871  
    124124(include "srfi-19-common")
    125125
     126(define (symbol->keyword sym) (string->keyword (symbol->string sym)))
     127
    126128;;
    127129
     
    417419  (let (
    418420    (tim (checked-tm:date->time 'date-adjust-duration dat tt))
    419     (dur (make-duration (string->keyword (symbol->string key)) amt)) )
     421    (dur (make-duration (symbol->keyword key) amt)) )
    420422    (checked-tm:time->date 'date-adjust-duration
    421423      (tm:add-duration tim dur (tm:as-some-time tim))
     
    495497  (tm:leap-year?
    496498    ;assume a number is a year, otherwise extract
    497     (if (fixnum? dat)
     499    (if (number? dat)
    498500      dat
    499501      (tm:date-year (check-date 'date-leap-year? dat)))) )
Note: See TracChangeset for help on using the changeset viewer.