chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] strange behavior with SRFI-19 date arithmetic


From: Todd Roth
Subject: [Chicken-users] strange behavior with SRFI-19 date arithmetic
Date: Sat, 4 Mar 2017 14:29:21 -0500

When using the date arithmetic functions in srfi-19 I’m getting incorrect 
results when specifying ‘days or any smaller DATE-KEY parameter. The ‘year 
DATE-KEY returns the correct date/time.  Below is an example from a repl 
session.  I’m seeing the same behavior when using the date-add-duration and 
date-subtract-duration functions.  Has anyone else seen this?


#;101> (time->date (current-time))
#,(date 767000000000000000 56 10 14 4 3 2017 -18000 EST #f #f #f #f)

#;110> (date-adjust (time->date (current-time)) 1 'years)
#,(date 226000000000000000 56 11 14 4 3 2018 -18000 EST #f #f #f #f)

#;152> (date-adjust (time->date (current-time)) 1 'days)
#,(date 0 53 58 19 9 6 2047 -18000 EST #f #f #f #f)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]