[Haskell-cafe] every Friday the 13th at midnight...

Brandon Allbery allbery.b at gmail.com
Fri Jul 27 17:14:11 CEST 2012


On Fri, Jul 27, 2012 at 5:50 AM, Corentin Dupont
<corentin.dupont at gmail.com>wrote:

> I'm looking for a library to be able to express, store and retrieve
> recurring appointments, like "every Monday at midnight".
> I saw Data.Time.Recurrence, which has a nice language, but how to store
> the appointments? A command like:
> *now <- getCurrentTime
> recur daily `begin` now*
> produces an infinite list of UTCTime.
>

You need to define your own serialization for its structures.  If "recur"
can't be serialized directly, your serialization needs to have a way to
represent an invocation of "recur" instead of trying to store its result.

This probably isn't provided because different people/applications have
different serialization needs, and it's quite easy to roll the
serialization yourself given the library as a starting point.

-- 
brandon s allbery                                      allbery.b at gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120727/f51eef61/attachment.htm>


More information about the Haskell-Cafe mailing list