PR libgcj/2641, PR libgcj/9854, PR libgcj/14892, PR libgcj/18083,
2005-03-23 Sven de Marothy <sven@physto.se> PR libgcj/2641, PR libgcj/9854, PR libgcj/14892, PR libgcj/18083, PR libgcj/11085: * java/util/Calendar.java (set): Use starting day of week when one is needed if none is given. * java/text/SimpleDateFormat.java (parse): Handle 1-12 and 1-24 timestamps correctly. * java/util/GregorianCalendar.java (computeTime, computeFields): HOUR should be in 0-11 format. (nonLeniencyCheck): Adjust leniency checking to that fact. (getLinearDay): Should be private. From-SVN: r96951
This commit is contained in:
parent
85c4f26a86
commit
8d3ece5d90
4 changed files with 54 additions and 22 deletions
|
@ -706,6 +706,8 @@ public abstract class Calendar implements Serializable, Cloneable
|
|||
isSet[WEEK_OF_YEAR] = false;
|
||||
break;
|
||||
case WEEK_OF_MONTH: // pattern 2
|
||||
if (! isSet[DAY_OF_WEEK])
|
||||
fields[DAY_OF_WEEK] = getFirstDayOfWeek();
|
||||
isSet[YEAR] = true;
|
||||
isSet[MONTH] = true;
|
||||
isSet[DAY_OF_WEEK] = true;
|
||||
|
@ -715,6 +717,8 @@ public abstract class Calendar implements Serializable, Cloneable
|
|||
isSet[WEEK_OF_YEAR] = false;
|
||||
break;
|
||||
case DAY_OF_WEEK_IN_MONTH: // pattern 3
|
||||
if (! isSet[DAY_OF_WEEK])
|
||||
fields[DAY_OF_WEEK] = getFirstDayOfWeek();
|
||||
isSet[YEAR] = true;
|
||||
isSet[MONTH] = true;
|
||||
isSet[DAY_OF_WEEK] = true;
|
||||
|
@ -733,6 +737,8 @@ public abstract class Calendar implements Serializable, Cloneable
|
|||
isSet[DAY_OF_WEEK_IN_MONTH] = false;
|
||||
break;
|
||||
case WEEK_OF_YEAR: // pattern 5
|
||||
if (! isSet[DAY_OF_WEEK])
|
||||
fields[DAY_OF_WEEK] = getFirstDayOfWeek();
|
||||
isSet[YEAR] = true;
|
||||
isSet[DAY_OF_WEEK] = true;
|
||||
isSet[MONTH] = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue