{"id":241336,"name":"time-interval","ecosystem":"hackage","description":"Two common ways to represent and hold short time intervals seem to be:\n\nHold time in microseconds as an Int or Integer\n\nUse time units abstraction, e.g. see the time-units package\n\nWhile the second option is a great abstraction to use in APIs, it works for\ndatatypes a bit less well than for function types. That's because a datatype\nwhich a Data.Time.Units.TimeUnit field suddenly becomes polymorphic over\nthat field, and all function type signatures involving that datatype need to\nbe updated. This is less an issue for functions, because you don't specify\nthe type of every function at the call site.\n\nPerhaps there is a solution for that which involves datatype related\nlanguage extensions, but this package tries to offer a simple clean solution\nas follows. You store time in your datatype as an integer, but it is wrapped\nby an opaque Data.Time.Interval.TimeInterval type. You then get the best of\nboth worlds:\n\nOn one hand, you can set the time field using any time unit thanks to the\ntime-units package, so you get a nice abstraction\n\nOn the other hand, your datatype holds a concrete time type\n\nThe time type can be equally used to represent time intervals, time durations\nand generally time lengths. But since high precision is used (microseconds),\nyou'll probably want this library for short time lengths (at most seconds,\nminutes, hours). For calendar based and related time functions and types, see\nthe time package.","homepage":"http://hub.darcs.net/fr33domlover/time-interval","licenses":"LicenseRef-PublicDomain","normalized_licenses":["Other"],"repository_url":"","keywords_array":["data","library","public-domain","Propose Tags"],"namespace":null,"versions_count":2,"first_release_published_at":"2015-09-10T19:33:04.000Z","latest_release_published_at":"2016-05-30T06:56:54.000Z","latest_release_number":"0.1.1","last_synced_at":"2026-05-15T09:46:01.309Z","created_at":"2022-04-06T02:47:25.411Z","updated_at":"2026-05-15T09:46:08.234Z","registry_url":"https://hackage.haskell.org/package/time-interval","install_command":"cabal install time-interval","documentation_url":null,"metadata":{},"repo_metadata":{},"repo_metadata_updated_at":"2026-05-15T09:46:08.170Z","dependent_packages_count":0,"downloads":5036,"downloads_period":"total","dependent_repos_count":0,"rankings":{"downloads":29.352737515404026,"dependent_repos_count":55.143477495452146,"dependent_packages_count":12.217592864268529,"stargazers_count":null,"forks_count":null,"average":32.2379359583749},"purl":"pkg:hackage/time-interval","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/hackage/time-interval","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/hackage/time-interval","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/hackage/time-interval/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":null,"versions_url":"https://packages.ecosyste.ms/api/v1/registries/hackage.haskell.org/packages/time-interval/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/hackage.haskell.org/packages/time-interval/version_numbers","latest_version_url":"https://packages.ecosyste.ms/api/v1/registries/hackage.haskell.org/packages/time-interval/latest_version","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/hackage.haskell.org/packages/time-interval/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/hackage.haskell.org/packages/time-interval/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/hackage.haskell.org/packages/time-interval/codemeta","maintainers":[{"uuid":"akrasner","login":"akrasner","name":null,"email":null,"url":null,"packages_count":28,"html_url":"https://hackage.haskell.org/user/akrasner","role":null,"created_at":"2022-11-14T20:06:10.095Z","updated_at":"2022-11-14T20:06:10.095Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/hackage.haskell.org/maintainers/akrasner/packages"}]}