Re: [jruby-dev] java.util.Calendar date methods

2012-10-17 Thread Carl Bourne
Thanks very much - that did the trick. On 17 Oct 2012, at 16:33, Anthony Juckel wrote: > You should use Calendar::DATE instead, since the value is an exposed constant > rather than method. > > On Oct 17, 2012 10:19 AM, "Carl Bourne" wrote: > Hi, > > I'm trying to do the equivalent of this i

Re: [jruby-dev] java.util.Calendar date methods

2012-10-17 Thread Anthony Juckel
You should use Calendar::DATE instead, since the value is an exposed constant rather than method. On Oct 17, 2012 10:19 AM, "Carl Bourne" wrote: > Hi, > > I'm trying to do the equivalent of this in JRuby. > > Calendar cal = Calendar.getInstance(); > cal.add(Calendar.DATE,

[jruby-dev] java.util.Calendar date methods

2012-10-17 Thread Carl Bourne
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: r