This is a Haskell library for handling date operations easily, e.g. calculating the beginning or end of a week, month, quarter, or year.
import qualified Data.Time as T
import qualified Data.Time.Calendar.DateConversions as DC
-- Given the following signatures
--
-- now :: T.UTCTime
DC.beginningOfWeek $ T.utctDay now
DC.beginningOfMonth $ T.utctDay now
DC.endOfYear $ T.utctDay now
This package is available on Hackage.
DateConversions is Copyright © 2016-2017 Josh Clayton and thoughtbot, inc. It is free software, and may be redistributed under the terms specified in the LICENSE file.
DateConversions is maintained and funded by thoughtbot, inc. The names and logos for thoughtbot are trademarks of thoughtbot, inc.
We love open source software and Haskell. See our other Haskell projects, or hire our Haskell development team to design, develop, and grow your product.