Rails 3/Ruby 1.9.2 Date.tomorrow not correct Rails 3/Ruby 1.9.2 Date.tomorrow not correct ruby ruby

Rails 3/Ruby 1.9.2 Date.tomorrow not correct


Was looking info online and came across this:
https://rails.lighthouseapp.com/projects/8994/tickets/6410-dateyesterday-datetoday


Check the last comment:

I do agree with you that its a bit confusing that you need to use Date.current with Date.yesterday instead of Date.today, but the general rule of thumb is Rails does not change how Ruby methods work, which Date.today is. All we can do is add better documentation and make sure people are aware of the subtle difference.


In other words, use current(rails) instead of today(ruby) to avoid problems.


I am also observing this. You can try DateTime.now.tomorrow.to_date.


You can also do Date.today + 1.day.