No commit activity in last 3 years
No release in over 3 years
A nice shortcut for date queries
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Date Supercharger

A nice shortcut for date queries.

Date Supercharger adds _between,_between_inclusive,_after, _after_or_at, _before and _before_or_at methods to every date/datetime field of Active Record models.

Build Status Code Climate Test Coverage Gem Version

Usage

between

Visit.created_at_between(from,to)

instead of

Visit.where("created_at >= ? AND created_at < ?",from,to)

### between_inclusive

Visit.created_at_between_inclusive(from,to)

instead of

Visit.where("created_at >= ? AND created_at <= ?",from,to)

### after/before

Visit.created_at_after(some_date)

instead of

Visit.where("created_at > ?",some_date)

### after_or_at/before_or_at

Visit.created_at_before_or_at(some_date)

instead of

Visit.where("created_at <= ?",some_date)

Installation

Add this line to your application’s Gemfile:

gem 'date_supercharger'

And then execute:

bundle

History

View the changelog

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help: