Calendar Question - maybe bug ?

Heiko Weber java at wecos.de
Tue May 30 05:57:18 PDT 2006


Am Dienstag, 30. Mai 2006 14:42 schrieb Panagiotis Astithas:
> Heiko Weber wrote:
> > Am Dienstag, 30. Mai 2006 12:21 schrieb Heiko Weber:
> >> Am Dienstag, 30. Mai 2006 10:00 schrieb Heiko Weber:
> >>> At the moment I compile jdk with patchset 3 on an other FreeBSD system
> >>> to verify ... there I can play with the timezone settings after
> >>> installation.
> >>
> >> Only for your information:
> >>
> >> /usr/ports/jdk15 fails to compile. I'll give diablo-jdk15 a try ... last
> >> output of "make" follows ...
> >
> > Compared to jdk15 the installation off diablo-jdk15 is much easier -
> > below a minute. But the result is still the same. Later then I used
> > sysinstall to change /etc/localtime to CDT, rebooted but no effect.
> >
> > # date
> > Tue May 30 06:40:58 CDT 2006
> >
> > # java -version
> > java version "1.5.0"
> > Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00)
> > Java HotSpot(TM) Server VM (build diablo-1.5.0_06-b00, mixed mode)
> >
> > What could make this difference? Is there any other way to implement a
> > weekOfTheYear(int year) funtion ?
> >
> > Anyone an idea what to try next ?
>
> Could you print out the value of cal.get(Calendar.WEEK_OF_YEAR) for
> those years? It's obviously not 53, but what exactly is it?

Sure, 31.12.XXXX print:

Weeks in Year 1990 = 1
Weeks in Year 1991 = 1
Weeks in Year 1992 = 1
Weeks in Year 1993 = 1
Weeks in Year 1994 = 53
Weeks in Year 1995 = 1
Weeks in Year 1996 = 1
Weeks in Year 1997 = 1
Weeks in Year 1998 = 1
Weeks in Year 1999 = 1
Weeks in Year 2000 = 1
Weeks in Year 2001 = 1
Weeks in Year 2002 = 1
Weeks in Year 2003 = 1
Weeks in Year 2004 = 1
Weeks in Year 2005 = 53
Weeks in Year 2006 = 1

Heiko


More information about the freebsd-java mailing list