import java.util.Calendar;
import java.util.GregorianCalendar;

public class GregorianWeekGotcha
   {

   /**
    * test harness
    *
    * @param args not used
    */
   public static void main ( String[] args )
      {
      GregorianCalendar g = new GregorianCalendar( /* yyyy mm dd */ 2007, 12-1, 31  );
      out.println( "WEEK_OF_YEAR: " + g.get( Calendar.WEEK_OF_YEAR ) );
      // prints 1!
      }
   }