{"id":15903694,"url":"https://github.com/shime/taw","last_synced_at":"2025-03-20T20:30:54.704Z","repository":{"id":56896924,"uuid":"119256509","full_name":"shime/taw","owner":"shime","description":"Time ago in words helper for non Rails projects.","archived":false,"fork":false,"pushed_at":"2018-10-30T20:24:36.000Z","size":31,"stargazers_count":9,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-17T17:49:38.274Z","etag":null,"topics":["minimalistic","ruby","time"],"latest_commit_sha":null,"homepage":"","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/shime.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-28T12:32:49.000Z","updated_at":"2024-12-05T11:44:03.000Z","dependencies_parsed_at":"2022-08-21T01:50:31.924Z","dependency_job_id":null,"html_url":"https://github.com/shime/taw","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shime%2Ftaw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shime%2Ftaw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shime%2Ftaw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shime%2Ftaw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shime","download_url":"https://codeload.github.com/shime/taw/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244685439,"owners_count":20493269,"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":["minimalistic","ruby","time"],"created_at":"2024-10-06T12:03:48.078Z","updated_at":"2025-03-20T20:30:54.427Z","avatar_url":"https://github.com/shime.png","language":"Ruby","readme":"# Taw\n\n[![Build Status](https://travis-ci.org/shime/taw.svg?branch=master)](https://travis-ci.org/shime/taw)\n\n**T**ime **A**go in **W**ords helper for non Rails projects.\nNo dependencies. No assumptions about your codebase. Minimalistic, ~90 SLOC.\n\n## Usage\n\n```ruby\nrequire \"taw\"\n\nTaw.time_ago_in_words(Time.now - 60 * 60 * 2) + \" ago\"\n# =\u003e \"2 hours ago\"\n\nTaw.time_ago_in_words(Time.now - 63) + \" ago\"\n# =\u003e \"1 minute and 3 seconds ago\"\n\nTaw.time_ago_in_words(Time.now - 60 * 60 * 2 - 63) + \" ago\"\n# =\u003e \"2 hours and 1 minute and 3 seconds ago\"\n\nTaw.time_ago_in_words(Time.now - 0.5) + \" ago\"\n# =\u003e \"a moment ago\"\n\nTaw.time_ago_in_words(Time.now - 60 * 60 * 26 - 63, approx: 1) + \" ago\"\n# =\u003e \"1 day ago\"\n\nTaw.time_ago_in_words(Time.now - 60 * 60 * 26 - 63, approx: 2) + \" ago\"\n# =\u003e \"1 day and 2 hours ago\"\n```\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'taw'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install taw\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` 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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nThis project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## Code of Conduct\n\nEveryone interacting in the Taw project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/shime/taw/blob/master/CODE_OF_CONDUCT.md).\n\n## License\n\n[MIT](/LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshime%2Ftaw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshime%2Ftaw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshime%2Ftaw/lists"}