private static int dayOfWeek ( int year , int month , int day ) {
  if ( year < 0 || year > 10000 || month < 1 || month > 12 || day < 1 || day > 31 ) throw new IllegalArgumentException ( ) ;
  int m = ( month - 3 + 4800 ) % 4800 ;
  int y = ( year + m / 12 ) % 400 ;
  m %= 12 ;
  return ( y + y / 4 - y / 100 + ( 13 * m + 2 ) / 5 + day + 2 ) % 7 ;
}

private static int dayOfWeek ( int year , int month , int day ) { if ( year < 0 || year > 10000 || month < 1 || month > 12 || day < 1 || day > 31 ) throw new IllegalArgumentException ( ) ; int m = ( month - 3 + 4800 ) % 4800 ; int y = ( year + m / 12 ) % 400 ; m %= 12 ; return ( y + y / 4 - y / 100 + ( 13 * m + 2 ) / 5 + day + 2 ) % 7 ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (throw_statement (object_creation_expression type: (type_identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) right: (decimal_integer_literal)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (decimal_integer_literal)))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) (return_statement (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (decimal_integer_literal))) right: (decimal_integer_literal))) right: (identifier)) right: (decimal_integer_literal))) right: (decimal_integer_literal)))))