{"id":17205621,"url":"https://github.com/simon0191/date_supercharger","last_synced_at":"2025-04-13T22:09:49.262Z","repository":{"id":59152758,"uuid":"41973332","full_name":"simon0191/date_supercharger","owner":"simon0191","description":"A nice shortcut for ActiveRecord date range queries","archived":false,"fork":false,"pushed_at":"2015-09-08T19:38:10.000Z","size":160,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T12:22:41.554Z","etag":null,"topics":["activerecord","date","daterange","ruby","ruby-gem"],"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/simon0191.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-05T19:41:58.000Z","updated_at":"2017-06-21T21:50:04.000Z","dependencies_parsed_at":"2022-09-13T11:01:17.354Z","dependency_job_id":null,"html_url":"https://github.com/simon0191/date_supercharger","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon0191%2Fdate_supercharger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon0191%2Fdate_supercharger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon0191%2Fdate_supercharger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon0191%2Fdate_supercharger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simon0191","download_url":"https://codeload.github.com/simon0191/date_supercharger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248491325,"owners_count":21112935,"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":["activerecord","date","daterange","ruby","ruby-gem"],"created_at":"2024-10-15T02:25:52.288Z","updated_at":"2025-04-13T22:09:49.236Z","avatar_url":"https://github.com/simon0191.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Date Supercharger\n\nA nice shortcut for date queries.\n\nDate Supercharger adds `_between`,`_between_inclusive`,`_after`, `_after_or_at`, `_before` and `_before_or_at` methods to every date/datetime field of Active Record models.\n\n[![Build Status](https://travis-ci.org/simon0191/date_supercharger.svg)](https://travis-ci.org/simon0191/date_supercharger)\n[![Code Climate](https://codeclimate.com/github/simon0191/date_supercharger/badges/gpa.svg)](https://codeclimate.com/github/simon0191/date_supercharger)\n[![Test Coverage](https://codeclimate.com/github/simon0191/date_supercharger/badges/coverage.svg)](https://codeclimate.com/github/simon0191/date_supercharger/coverage)\n[![Gem Version](https://badge.fury.io/rb/date_supercharger.svg)](http://badge.fury.io/rb/date_supercharger)\n\n## Usage\n\n### between\n\n```ruby\nVisit.created_at_between(from,to)\n```\n\ninstead of\n\n```ruby\nVisit.where(\"created_at \u003e= ? AND created_at \u003c ?\",from,to)\n```\n\n### between_inclusive\n```ruby\nVisit.created_at_between_inclusive(from,to)\n```\n\ninstead of\n\n```ruby\nVisit.where(\"created_at \u003e= ? AND created_at \u003c= ?\",from,to)\n```\n\n### after/before\n\n```ruby\nVisit.created_at_after(some_date)\n```\n\ninstead of\n\n```ruby\nVisit.where(\"created_at \u003e ?\",some_date)\n```\n\n### after_or_at/before_or_at\n\n```ruby\nVisit.created_at_before_or_at(some_date)\n```\n\ninstead of\n\n```ruby\nVisit.where(\"created_at \u003c= ?\",some_date)\n```\n\n## Installation\n\nAdd this line to your application’s Gemfile:\n\n```ruby\ngem 'date_supercharger'\n```\n\nAnd then execute:\n\n```sh\nbundle\n```\n\n## History\n\nView the [changelog](https://github.com/simon0191/date_supercharger/blob/master/CHANGELOG.md)\n\n## Contributing\n\nEveryone is encouraged to help improve this project. Here are a few ways you can help:\n\n- [Report bugs](https://github.com/simon0191/date_supercharger/issues)\n- Fix bugs and [submit pull requests](https://github.com/simon0191/date_supercharger/pulls)\n- Write, clarify, or fix documentation\n- Suggest or add new features\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon0191%2Fdate_supercharger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimon0191%2Fdate_supercharger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon0191%2Fdate_supercharger/lists"}