Hi,
I'm trying to do the equivalent of this in JRuby.
Calendar cal = Calendar.getInstance();
cal.add(Calendar.DATE, -1);
Date notBefore = cal.getTime();
cal.add(Calendar.DATE, 2);
Date notAfter = cal.getTime();
This is my JRuby code:
require 'java'
cal = java.util.Calendar.getInstance
cal.add(java.util.Calendar.DATE, -1)
notBefore = cal.getTime
cal.add(java.util.Calendar.DATE, 2)
notAfter = cal.getTime
However, I'm getting the following exception:
NoMethodError: undefined method `DATE' for Java::JavaUtil::Calendar:Class
Am I missing or misunderstanding something here?
Regards,
Carl
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email