private static int
	g_numdays(int month,
		  int year)
	{
	   int y;
	
	   y = Math.abs(year);
	
	   /* Compute the last date of the month for the Gregorian calendar. */
	   switch (month)
	   {
	      case 2:
		 if ( (((y % 4) == 0) && ((y % 100) != 0)) || ((y % 400) == 0) )
		    return(29);
		 else
		    return(28);
	      case 4:
	      case 6:
	      case 9:
	      case 11: return(30);
	      default: return(31);
	   }
	}