Could time.at() be used to avoid all the extra sets?  I think they
both use seconds since Epoch.  Unless it is timezone screwy?

-Tom

On Thu, 23 Mar 2006, Nick Sieger defenestrated me:

> 
>    This is a rather blunt instrument for now, but anyone have any
>    comments on the approach?  See attached patch to JavaUtil.
>    --- testDateConversion.rb
>    require 'test/minirunit'
>    require 'java'
>    include_class ' java.util.Calendar'
>    cal = Calendar.getInstance
>    time = cal.getTime
>    test_ok time.kind_of?(Time)
>    test_equal cal.get(Calendar::YEAR), time.year
>    test_equal cal.get(Calendar::MONTH), time.month
>    test_equal cal.get(Calendar::DATE), time.day
>    test_equal cal.get(Calendar::HOUR_OF_DAY), time.hour
>    test_equal cal.get(Calendar::MINUTE), time.min
>    test_equal cal.get(Calendar::SECOND), time.sec
>    --- end testDateConversion.rb
>    /Nick




-- 
+ http://www.tc.umn.edu/~enebo +---- mailto:[EMAIL PROTECTED] ----+
| Thomas E Enebo, Protagonist  | "Luck favors the prepared    |
|                              |  mind." -Louis Pasteur       |


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Jruby-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jruby-devel

Reply via email to