{"id":13507761,"url":"https://github.com/DevL/good_times","last_synced_at":"2025-03-30T09:33:04.085Z","repository":{"id":30226320,"uuid":"33777415","full_name":"DevL/good_times","owner":"DevL","description":"Expressive and easy to use datetime functions in Elixir.","archived":true,"fork":false,"pushed_at":"2025-03-10T12:32:01.000Z","size":131,"stargazers_count":46,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-10T13:33:24.463Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DevL.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-04-11T13:49:49.000Z","updated_at":"2025-03-10T12:32:16.000Z","dependencies_parsed_at":"2024-01-05T21:54:29.168Z","dependency_job_id":"ed1ec59d-0232-4e38-811a-3516724915ac","html_url":"https://github.com/DevL/good_times","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevL%2Fgood_times","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevL%2Fgood_times/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevL%2Fgood_times/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevL%2Fgood_times/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevL","download_url":"https://codeload.github.com/DevL/good_times/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246301963,"owners_count":20755512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T02:00:38.704Z","updated_at":"2025-03-30T09:33:04.078Z","avatar_url":"https://github.com/DevL.png","language":"Elixir","funding_links":[],"categories":["Date and Time"],"sub_categories":[],"readme":"# GoodTimes\n\n**NB:** This repository has been moved to [https://codeberg.org/DevL/good_times](https://codeberg.org/DevL/good_times).\n\n[![Build Status](https://travis-ci.org/DevL/good_times.svg?branch=master)](https://travis-ci.org/DevL/good_times)\n[![Inline docs](http://inch-ci.org/github/DevL/good_times.svg?branch=master)](http://inch-ci.org/github/DevL/good_times)\n[![Hex.pm](https://img.shields.io/hexpm/v/good_times.svg)](https://hex.pm/packages/good_times)\n[![Documentation](https://img.shields.io/badge/Documentation-online-c800c8.svg)](http://hexdocs.pm/good_times)\n\nExpressive and easy to use datetime functions.\n\n\u003e Unbelivably nice...I'm proud that we have this.\n\u003e\n\u003e -- _Josh Adams, [Elixir sips](http://elixirsips.com) episode 145_\n\n## Examples\n\n```elixir\niex\u003e import GoodTimes\nnil\niex\u003e now\n{{2015, 3, 16}, {16, 58, 25}}\niex\u003e 10 |\u003e seconds_from_now\n{{2015, 3, 16}, {16, 58, 35}}\niex\u003e 60 |\u003e seconds_ago\n{{2015, 3, 16}, {16, 57, 25}}\niex\u003e import GoodTimes.Convert\nnil\niex\u003e now |\u003e to_date\n{2015, 3, 16}\niex\u003e import GoodTimes.Date\nnil\niex\u003e yesterday\n{2015, 3, 15}\niex\u003e tomorrow |\u003e at({12, 30, 0})\n{{2015, 3, 17}, {12, 30, 0}}\niex\u003e import GoodTimes.Boundary\nnil\niex\u003e now |\u003e end_of_week\n{{2015, 3, 22}, {23, 59, 59}}\niex\u003e import GoodTimes.Generate\nnil\niex\u003e all_days_after({{2016, 2, 28}, {10, 0, 0}}) |\u003e Enum.take(3)\n[{{2016, 2, 28}, {10, 0, 0}}, {{2016, 2, 29}, {10, 0, 0}},\n {{2016, 3, 1}, {10, 0, 0}}]\n```\n\n## Usage\n\nUpdate your `mix.exs` file and run `mix deps.get`.\n```elixir\ndefp deps do\n  [{:good_times, \"~\u003e 1.1\"}]\nend\n```\n\nImport the module or modules holding the functions you want to use.\n```elixir\ndefmodule MyModule do\n  import GoodTimes            # core functions.\n  import GoodTimes.Boundary   # find boundaries between time units.\n  import GoodTimes.Convert    # convert between dates, datetimes and times.\n  import GoodTimes.Date       # functions operating on and returning dates.\n  import GoodTimes.Generate   # functions generating streams of time units.\n```\n\nFor more information, see [the full documentation](http://hexdocs.pm/good_times/).\n\n## Known limitations\n\nAs GoodTimes uses [Erlangs calendar module](http://erlang.org/doc/man/calendar.html), dates and times before year 0 aren't supported.\n\n## Online documentation\n\nFor more information, see [the full documentation](http://hexdocs.pm/good_times).\n\n## Contributing\n\n1. Fork this repository\n2. Create your feature branch (`git checkout -b better-times`)\n3. Commit your changes (`git commit -am 'Let the good times roll!'`)\n4. Push to the branch (`git push origin better-times`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDevL%2Fgood_times","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDevL%2Fgood_times","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDevL%2Fgood_times/lists"}