Traditional Culture Encyclopedia - Almanac inquiry - The setting problem of JAVA calendar
The setting problem of JAVA calendar
Calendar has two modes to interpret calendar fields, namely, loose and.
Not tolerant. When the calendar is spacious.
Mode, it can accept a larger range of values than the range of calendar fields it generates. When Calendar recalculates the calendar field values, so that
When get () returns these values, all calendar fields are standardized. For example, in the relaxed mode
GregorianCalendar will month = =
January and a day in January == 32 is interpreted as February 1.
Analysis program:
After the implementation of cal.set (July 3, 20031), the date indicated by cal is August 3, 20031;
Executing cal.set(Calendar. Month, 8), it should be September 3, 20031. However, there is no September 3 1, so the month will be recursively changed to June 2003 10.
- Previous article:2008 lunar calendar inquiry
- Next article:A complete list of auspicious days moving on the ecliptic from June 5438 to February 2022.
- Related articles
- Has Xi 'an Express stopped? Can you send and receive it now? -perpetual calendar
- Tell you a cruel fact, poverty will be engraved into genes and inherited!
- List of 20 19 auspicious days
- 65438+February 24th, 65438+February 24th.
- ¡¾ auspicious day of the zodiac ¡¿ 20 18 12/9 Gregorian calendar query
- Which dynasty is engraving printing?
- Where is the enterprise of electroplating gold for Guangdong FFC flat cable? We should specialize in electroplating FFC flat cable.
- China calendar free fortune telling.
- 2022. 1. 1 solar calendar
- Yaan rainy city weather yearbook