Java specifies a date, such as the number of weeks, the number of weeks, and the number of weeks in java.
Public static void main (String [] args) throws ClassNotFoundException,
IOException, ParseException {
SimpleDateFormat dateFormatter = new SimpleDateFormat ("yyyy-MM-dd ");
String str = "2015-2-8 ";
System. out. println ("str =" + str );
Date date = dateFormatter. parse (str );
DateFormatter. applyPattern ("D ");
System. out. println ("day of the year:" + dateFormatter. format (date ));
DateFormatter. applyPattern ("d ");
System. out. println ("the day of the month:" + dateFormatter. format (date ));
DateFormatter. applyPattern ("w ");
System. out. println ("week of the year:" + dateFormatter. format (date ));
DateFormatter. applyPattern ("W ");
System. out. println ("week of the month:" + dateFormatter. format (date ));
DateFormatter. applyPattern ("E ");
System. out. println ("days in a week:" + dateFormatter. format (date ));
}