[racket] Library for date arithmetic?

From: Hendrik Boom (hendrik at topoi.pooq.com)
Date: Fri Mar 14 11:59:51 EDT 2014

On Thu, Mar 13, 2014 at 09:24:09AM -0700, John Clements wrote:
> 
> On Mar 11, 2014, at 12:32 PM, Ismael Figueroa <ifigueroap at gmail.com> wrote:
> > 
> > (define d      (seconds->date (find-seconds seconds minutes hours day month year)))
> > (define d+1 (seconds->date (find-seconds seconds minutes hours (+ day 1) month year))
> > (define d+2 (seconds->date (find-seconds seconds minutes hours (+ day 2) month year))
> > (define d+3 (seconds->date (find-seconds seconds minutes hours (+ day 3) month year))

An excellent example of how easy it is to make confusing identifiers.
I keep reading examples in style guides where someone says a declaration like
  const int two = 3;
is bad.  Well, two = 3 is obvious, but the one above isn't.

What could be clearer than day d+1 being one day past day d?
Yet d+1 is not d plus one.

Some programmers say that the single most difficult task in progrmming
is thinking of good variable names.  I'm inclined to agree.

-- hendrik

Posted on the users mailing list.