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
java.util.Date


View this message in context:
http://www.nabble.com/how-to-comparing-java-date-with-ruby-date-tp23664181p23664181.html
Sent from the JRuby - User mailing list archive at Nabble.com.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email