typeclasses / haskell-phrasebook

The Haskell Phrasebook: a quick intro to Haskell via small annotated example programs
https://typeclasses.com/phrasebook
210 stars 22 forks source link

Time #5

Open chris-martin opened 5 years ago

chris-martin commented 5 years ago

There's some extremely common time-related tasks it'd be really nice to demonstrate.

If using the time package, make sure you're using the latest version, because the API has changed a bit recently. time has gotten a bit better with the new changes but I wouldn't mind recommending a different library if anybody can recommend something friendlier.

Potential idea for a practial example: use the cookies library to generate a set-cookie header for a cookie that is set to expire one month in the future.