Guest User

Untitled

a guest
Feb 21st, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1.  
  2. # d = 2007-01-08
  3. irb(#<#<Class:0x249cce8>:0x249cb94>):001:0> d.to_s
  4. => "2007-01-08"
  5. # rate.start_date = 2007-01-06
  6. # rate.end_date = 2007-04-06
  7. irb(#<#<Class:0x249cce8>:0x249cb94>):002:0> rate = @low_seasons[1]
  8. => #<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"}>
  9. # Yet apparently d is not in the date range?
  10. irb(#<#<Class:0x249cce8>:0x249cb94>):003:0> (rate.start_date..rate.end_date).include?(d)
  11. => false
Add Comment
Please, Sign In to add comment