{"id":18026808,"url":"https://github.com/yegor256/tago","last_synced_at":"2026-01-26T07:02:10.545Z","repository":{"id":243828580,"uuid":"813561490","full_name":"yegor256/tago","owner":"yegor256","description":"Convenient .ago() and .seconds() helpers for Ruby’s Time and String classes","archived":false,"fork":false,"pushed_at":"2026-01-20T03:21:50.000Z","size":208,"stargazers_count":2,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-20T10:11:40.503Z","etag":null,"topics":["logging","ruby","ruby-gem","string-formatting","time","time-formatting","time-progress"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/tago","language":"Ruby","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/yegor256.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-11T10:03:38.000Z","updated_at":"2026-01-20T03:21:03.000Z","dependencies_parsed_at":"2025-05-05T06:24:15.876Z","dependency_job_id":"947c5459-21e7-4e8b-b125-b631a3159b1d","html_url":"https://github.com/yegor256/tago","commit_stats":null,"previous_names":["yegor256/tago"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/yegor256/tago","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Ftago","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Ftago/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Ftago/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Ftago/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yegor256","download_url":"https://codeload.github.com/yegor256/tago/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Ftago/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28769212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T06:37:25.426Z","status":"ssl_error","status_checked_at":"2026-01-26T06:37:23.039Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["logging","ruby","ruby-gem","string-formatting","time","time-formatting","time-progress"],"created_at":"2024-10-30T08:08:07.453Z","updated_at":"2026-01-26T07:02:10.540Z","avatar_url":"https://github.com/yegor256.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Adds `.ago()` Method to the `Time` Class\n\n[![DevOps By Rultor.com](https://www.rultor.com/b/yegor256/tago)](https://www.rultor.com/p/yegor256/tago)\n[![We recommend RubyMine](https://www.elegantobjects.org/rubymine.svg)](https://www.jetbrains.com/ruby/)\n\n[![rake](https://github.com/yegor256/tago/actions/workflows/rake.yml/badge.svg)](https://github.com/yegor256/tago/actions/workflows/rake.yml)\n[![PDD status](https://www.0pdd.com/svg?name=yegor256/tago)](https://www.0pdd.com/p?name=yegor256/tago)\n[![Gem Version](https://badge.fury.io/rb/tago.svg)](https://badge.fury.io/rb/tago)\n[![Test Coverage](https://img.shields.io/codecov/c/github/yegor256/tago.svg)](https://codecov.io/github/yegor256/tago?branch=master)\n[![Yard Docs](https://img.shields.io/badge/yard-docs-blue.svg)](https://rubydoc.info/github/yegor256/tago/master/frames)\n[![Hits-of-Code](https://hitsofcode.com/github/yegor256/tago)](https://hitsofcode.com/view/github/yegor256/tago)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/tago/blob/master/LICENSE.txt)\n\nFirst, install it:\n\n```bash\ngem install tago\n```\n\nHere is how you use it:\n\n```ruby\nstart = Time.now\n# something long\nputs \"It took #{start.ago} to do it\"\n```\n\nIt's also possible to convert Float seconds to text:\n\n```ruby\ns = Time.now - start\nputs \"It took #{s.seconds}\"\n```\n\nThe `seconds` method accepts optional formatting flags:\n\n```ruby\n9.444.seconds           # =\u003e \"9s444ms\"\n9.444.seconds(:round)   # =\u003e \"9s\" (omits sub-units)\n9.444.seconds(:short)   # =\u003e \"9s\" (also omits sub-units)\n300.0.seconds(:pretty)  # =\u003e \"five minutes\" (words instead of abbreviations)\n300.0.seconds(:pretty, :short) # =\u003e \"5 min\" (numeric with short unit names)\n5.0.seconds(:pretty, :caps)    # =\u003e \"Five seconds\" (capitalizes first letter)\n```\n\nThe same flags work with `ago`:\n\n```ruby\nstart.ago(:round)\nstart.ago(:pretty)\nstart.ago(:pretty, :short)\nstart.ago(:pretty, :caps)\nstart.ago(Time.now, :round)\n```\n\nThe gem basically extends the `Float` and `Time` classes with new methods.\n\n## How to contribute\n\nRead\n[these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).\nMake sure your build is green before you contribute\nyour pull request. You will need to have\n[Ruby](https://www.ruby-lang.org/en/) 3.2+ and\n[Bundler](https://bundler.io/) installed. Then:\n\n```bash\nbundle update\nbundle exec rake\n```\n\nIf it's clean and you don't see any error messages, submit your pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyegor256%2Ftago","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyegor256%2Ftago","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyegor256%2Ftago/lists"}