--
You received this message because you are subscribed to the "Groovy Users of Minnesota" group.
To post to this group, send email to groo...@googlegroups.com
To unsubscribe from this group, send email to groovymn-u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/groovymn?hl=en
Hope all is well at Bloom,
Andy.
On 12/30/10 12:17 AM, Ted Naleid wrote:
> Don't blame groovy, this is Java setting the epoch time for the year
> it stores to start in 1900:
>
> http://download.oracle.com/javase/1.4.2/docs/api/java/util/Date.html#setYear(int)
> <http://download.oracle.com/javase/1.4.2/docs/api/java/util/Date.html#setYear%28int%29>
I suppose this is a side effect of the dynamic nature of groovy:
Accessing methods in this way means there's no tool support for warning
me that the code is using methods marked as deprecated in java.
Andy.
On 12/30/10 12:17 AM, Luke Bredeson wrote:
> I'm guessing it's because the map you passed to the constructor is
> converted by Groovy to a deprecated setYear(int year) method call on
> java.util.Date that adds 1900 to the parameter you passed. See:
> http://download.oracle.com/javase/6/docs/api/java/util/Date.html#setYear(int)
> <http://download.oracle.com/javase/6/docs/api/java/util/Date.html#setYear%28int%29>