[I'm unaccountably happy about the fact that the gregor docs on
pkg-build.racket-lang.org reveal that they were scribbled on a machine
in the America/Denver time zone. -J]


On Mon, Aug 31, 2015 at 9:33 AM, Jon Zeppieri <zeppi...@gmail.com> wrote:
> I've added a couple of features to gregor:
>
> - Calendar query functions:
> [http://pkg-build.racket-lang.org/doc/gregor/query.html]
>   These are functions that were already used internally by the library
>   but should be public (and now are).
>   - leap-year?
>   - days-in-year
>   - days-in-month
>   - iso-weeks-in-year
>
> - Periods: [http://pkg-build.racket-lang.org/doc/gregor/period.html]
>   A period represents some period of time. To allow arithmetic on
>   periods, arithmetic has been moved into its own set of generics.
>   So, for example, `+years` is no longer part of the `date-provider`
>   interface; it's now part of `date-arithmetic-provider`, and values
>   that satisfy `date-period?` also satisfy `date-arithmetic-provider?`.
>   So you can, for example, write:
>   ```
>   (+months (years 2) 6)
>   ```
>   ... which results in a period of 2 years, 6 months.
>   In addition, the following new arithmetic functions were added:
>     - [+/-]date-period (on date-arithmetic-provider)
>     - [+/-]time-period (on time-arithmetic-provider)
>     - [+/-]period (on datetime-arithmetic-provider)
>
> And `duration-between` was removed in favor of
> date-period-between, time-period-between, and
> period-between.
>
>
> Documentation: http://pkg-build.racket-lang.org/doc/gregor/index.html
> Source: https://github.com/97jaz/gregor
>
> -Jon

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to