Use of Date:
1. Date of Creation
2. Date format display
3. Conversion of dates
4, two date size comparison, date of the addition and subtraction
Some knowledge:
Carve-out of 24 time zones worldwide
Greenwich Mean Time GMT
World Coordination Time (world standard Time) UTC
Summer Time saving DST
CST Time
CST can also represent the following 4 different time zones:
Central Standard Time (USA) ut-6:00
Central Standard Time (Australia) ut+9:30
China Standard Time ut+8:00
Cuba Standard Time ut-4:00
CST can also represent the standard time in four countries of the United States, Australia, China, and Cuba.
Date class
The date class can get the current time, a comparison of two date types, a date type of milliseconds, but many methods and obsolete. If you get a specific date, time, and seconds.
New Date (); New Date (); Date.after (datetwo); Date.compareto (datetwo);
Calendar class
The Calendar class is an abstract class that provides a class method getinstance. From the calendar instance, you can get information about the time zone for the month and day.
The calendar week is starting from Sunday, with a constant value of 0.
The month of the calendar is starting in January with a constant value of 0.
The first day of the month of the calendar has a value of 1.
Calendar instance = calendar.getinstance (); int i = instance.get (calendar.date); int i1 = instance.get (calendar.hour); int i2 = instance.get (calendar.month); System.out.println ("i2 =" + I2 + ", I1 =" + I1 + ", i=" + i);
SimpleDateFormat class
DateTime class