/[classpath]/classpath/java/text/MessageFormat.java
ViewVC logotype

Diff of /classpath/java/text/MessageFormat.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11.2.8 by gnu_andrew, Sat Feb 19 10:50:41 2005 UTC revision 1.11.2.9 by gnu_andrew, Fri May 27 00:01:45 2005 UTC
# Line 113  public class MessageFormat extends Forma Line 113  public class MessageFormat extends Forma
113            formatClass = java.util.Date.class;            formatClass = java.util.Date.class;
114    
115            int val = DateFormat.DEFAULT;            int val = DateFormat.DEFAULT;
116              boolean styleIsPattern = false;
117            if (style == null)            if (style == null)
118              ;              ;
119            else if (style.equals("short"))            else if (style.equals("short"))
# Line 123  public class MessageFormat extends Forma Line 124  public class MessageFormat extends Forma
124              val = DateFormat.LONG;              val = DateFormat.LONG;
125            else if (style.equals("full"))            else if (style.equals("full"))
126              val = DateFormat.FULL;              val = DateFormat.FULL;
127              else
128                styleIsPattern = true;
129    
130            if (type.equals("time"))            if (type.equals("time"))
131              format = DateFormat.getTimeInstance(val, loc);              format = DateFormat.getTimeInstance(val, loc);
132            else            else
133              format = DateFormat.getDateInstance(val, loc);              format = DateFormat.getDateInstance(val, loc);
134    
135            if (style != null && val == DateFormat.DEFAULT)            if (styleIsPattern)
136              {              {
137                SimpleDateFormat sdf = (SimpleDateFormat) format;                SimpleDateFormat sdf = (SimpleDateFormat) format;
138                sdf.applyPattern(style);                sdf.applyPattern(style);

Legend:
Removed from v.1.11.2.8  
changed lines
  Added in v.1.11.2.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26