[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] strange behavior with SRFI-19 date arithmetic
From: |
Kon Lovett |
Subject: |
Re: [Chicken-users] strange behavior with SRFI-19 date arithmetic |
Date: |
Sat, 4 Mar 2017 12:43:35 -0800 |
> On Mar 4, 2017, at 11:29 AM, Todd Roth <address@hidden> wrote:
>
> 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)
Sorry, my fault. Hopefully all better now:
#;2> (define t1 (time->date (current-time)))
#;3> t1
#,(date 689000000 48 37 12 4 3 2017 -28800 PST #f #f #f #f)
#;4> (date-adjust t1 1 'days)
#,(date 689000000 48 37 12 5 3 2017 -28800 PST #f #f #f #f)
version 3.4.1 should be available in a few hours.
> _______________________________________________
> Chicken-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/chicken-users