How to comparing java date with ruby date


How can I compare a Ruby Date with Java Date. E.g.

include Java
require ‘date’
rbdate = Date.parse(“2008-08-01”)
formatter = java.text.SimpleDateFormat(“yyyy/MM/dd”)
jdate = formatter.parse(“2009/02/01”)
puts “date comparison” if jdate > rbdate

currently an exception is thrown stating a ruby object cannot be cast to

View this message in context:
Sent from the JRuby - User mailing list archive at

To unsubscribe from this list, please visit: