0.0
No commit activity in last 3 years
No release in over 3 years
Fixes for date queries in AWS::Record
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 2.0.0

Runtime

~> 1.8.0
 Project Readme

SimpleDateFix

Fixes for date queries using AWS::Record::Model. This gem is based on work done by daniel-nelson in this pull request to the 'aws-sdk' gem. Thanks, Daniel!

Gem Version Code Climate

Installation

Add this line to your application's Gemfile:

gem 'simple_date_fix'

And then execute:

$ bundle

Or install it yourself as:

$ gem install simple_date_fix

Usage

Now you can query your datetime_attrs.

class Event < AWS::Record::Model
  datetime_attr :timestamp
end

e = Event.create!(:timestamp => Time.now - 6.hours)

Event.where("timestamp > ?",Time.now - 7.hours).first
# => e

Event.where("timestamp > ?",Time.now - 5.hours).first
# => nil

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request