Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_java thread: Date format ??? Question


Message #1 by Guerrino Di Minno <GDiMinno@h...> on Wed, 10 Oct 2001 11:52:50 -0400
> GINO wrote:

> Can someone please help me... Please look at this code,
> 
> SimpleTimeZone pdt = new SimpleTimeZone(-8 * 60 * 60 * 1000, "PST");
>  pdt.setStartRule(DateFields.APRIL, 1, DateFields.SUNDAY, 2*60*60*1000);
>  pdt.setEndRule(DateFields.OCTOBER, -1, DateFields.SUNDAY, 2*60*60*1000);

> But I'm always getting an error with DateFields undefined name.

DateFields is not one of the core java classes. If you want to use 
constants from the core java classes, you probably want Calendar. The 
class Calendar defines the constants you use in the code above.

If you created your own class DateField, then the most likely problem is 
that you classpath is wrong and the compiler can't find the DateField 
class.

  Return to Index