Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # d = 2007-01-08
- irb(#<#<Class:0x249cce8>:0x249cb94>):001:0> d.to_s
- => "2007-01-08"
- # rate.start_date = 2007-01-06
- # rate.end_date = 2007-04-06
- irb(#<#<Class:0x249cce8>:0x249cb94>):002:0> rate = @low_seasons[1]
- => #<Season:0x240b658 @attributes={"end_date"=>"2007-04-06 00:00:00", "start_date"=>"2007-01-06 00:00:00", "name"=>"Season 1", "rate_id"=>"13", "id"=>"45"}>
- # Yet apparently d is not in the date range?
- irb(#<#<Class:0x249cce8>:0x249cb94>):003:0> (rate.start_date..rate.end_date).include?(d)
- => false
Add Comment
Please, Sign In to add comment