{"id":18103909,"url":"https://github.com/dannnylo/tempus","last_synced_at":"2025-07-12T08:36:52.873Z","repository":{"id":2298054,"uuid":"3256567","full_name":"dannnylo/tempus","owner":"dannnylo","description":"Gem to efficiently manipulate the time, adding, subtracting and converting hours.","archived":false,"fork":false,"pushed_at":"2024-10-05T23:17:10.000Z","size":53,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-03T19:07:30.594Z","etag":null,"topics":["hacktoberfest","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"gautamarora/workbook-progress-tracker","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dannnylo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"dannnylo"}},"created_at":"2012-01-24T14:44:52.000Z","updated_at":"2024-10-05T23:16:36.000Z","dependencies_parsed_at":"2025-04-15T09:46:23.747Z","dependency_job_id":null,"html_url":"https://github.com/dannnylo/tempus","commit_stats":{"total_commits":31,"total_committers":3,"mean_commits":"10.333333333333334","dds":0.3870967741935484,"last_synced_commit":"6871d84ef7f4f2c232e821f2196ab6185f8cd1d9"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/dannnylo/tempus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannnylo%2Ftempus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannnylo%2Ftempus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannnylo%2Ftempus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannnylo%2Ftempus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dannnylo","download_url":"https://codeload.github.com/dannnylo/tempus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannnylo%2Ftempus/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264963957,"owners_count":23690154,"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":["hacktoberfest","ruby"],"created_at":"2024-10-31T22:13:31.222Z","updated_at":"2025-07-12T08:36:52.844Z","avatar_url":"https://github.com/dannnylo.png","language":"Ruby","funding_links":["https://github.com/sponsors/dannnylo"],"categories":[],"sub_categories":[],"readme":"# Tempus\n\n\u003ca href='http://badge.fury.io/rb/tempus'\u003e\n    \u003cimg src=\"https://badge.fury.io/rb/tempus.png\" alt=\"Gem Version\" /\u003e\n\u003c/a\u003e\n\nGem to efficiently manipulate the time, adding, subtracting and converting hours.\n\n## Installation\n\nInstall the gem and add to the application's Gemfile by executing:\n\n    $ bundle add tempus\n\nIf bundler is not being used to manage dependencies, install the gem by executing:\n\n    $ gem install tempus\n\n## Usage\n\nWith this gem you can manage durations of time.\n\n### Initialize with duration\n```ruby\n  hours = Tempus.new(30.hours  + 5.minutes + 3.seconds)\n  =\u003e \u003cTempus:8508680 seconds=108303.0, formated=30:05:03\u003e\n  hours.value_in_minutes\n  =\u003e 1805.05\n  hours.to_s(\"%H hours and %M minutes\")\n  =\u003e \"30 hours and 05 minutes\"\n```\n### Convert from other types\n```ruby\n  hours = \"35:05:01\".to_tempus\n  =\u003e \u003cTempus:7228060 seconds=126301.0, formated=35:05:01\u003e\n  hours + 6.hours\n  =\u003e \u003cTempus:6931320 seconds=147901.0, formated=41:05:01\u003e\n```\n```ruby\n  Tempus.new(Time.now)\n  =\u003e \u003cTempus:6578680 seconds=46455.162950918, formated=12:54:15\u003e\n```\n\n### Sum durations\n\n```ruby\n  \"1:00:00\".to_tempus + \"2:00\"\n  =\u003e \u003cTempus:6634700 seconds=10800.0, formated=03:00:00\u003e\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/dannnylo/tempus. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/dannnylo/tempus/blob/master/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Tempus project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/dannnylo/tempus/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannnylo%2Ftempus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdannnylo%2Ftempus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannnylo%2Ftempus/lists"}