Java Doc for DateFormatSymbols.java in  » 6.0-JDK-Modules » j2me » java » text » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » java.text 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.text.DateFormatSymbols

DateFormatSymbols
public class DateFormatSymbols implements Serializable,Cloneable(Code)
DateFormatSymbols is a public class for encapsulating localizable date-time formatting data, such as the names of the months, the names of the days of the week, and the time zone data. DateFormat and SimpleDateFormat both use DateFormatSymbols to encapsulate this information.

Typically you shouldn't use DateFormatSymbols directly. Rather, you are encouraged to create a date-time formatter with the DateFormat class's factory methods: getTimeInstance, getDateInstance, or getDateTimeInstance. These methods automatically create a DateFormatSymbols for the formatter so that you don't have to. After the formatter is created, you may modify its format pattern using the setPattern method. For more information about creating formatters using DateFormat's factory methods, see DateFormat .

If you decide to create a date-time formatter with a specific format pattern for a specific locale, you can do so with:

 new SimpleDateFormat(aPattern, new DateFormatSymbols(aLocale)).
 

DateFormatSymbols objects are cloneable. When you obtain a DateFormatSymbols object, feel free to modify the date-time formatting data. For instance, you can replace the localized date-time format pattern characters with the ones that you feel easy to remember. Or you can change the representative cities to your favorite ones.

New DateFormatSymbols subclasses may be added to support SimpleDateFormat for date-time formatting for additional locales.
See Also:   DateFormat
See Also:   SimpleDateFormat
See Also:   java.util.SimpleTimeZone
version:
   1.41, 10/10/06
author:
   Chen-Lieh Huang



Field Summary
 Stringampms
     AM and PM strings.
 Stringeras
     Era strings.
 StringlocalPatternChars
     Localized date-time pattern characters.
final static  intmillisPerHour
     Useful constant for defining timezone offsets.
 Stringmonths
     Month strings.
final static  StringpatternChars
     Unlocalized date-time pattern characters.
final static  longserialVersionUID
    
 StringshortMonths
     Short month strings.
 StringshortWeekdays
     Short weekday strings.
 Stringweekdays
     Weekday strings.
 StringzoneStrings
     Localized names of time zones in this locale.

Constructor Summary
public  DateFormatSymbols()
     Construct a DateFormatSymbols object by loading format data from resources for the default locale.
public  DateFormatSymbols(Locale locale)
     Construct a DateFormatSymbols object by loading format data from resources for the given locale.

Method Summary
public  Objectclone()
    
public  booleanequals(Object obj)
    
public  String[]getAmPmStrings()
     Gets ampm strings.
public  String[]getEras()
     Gets era strings.
public  StringgetLocalPatternChars()
     Gets localized date-time pattern characters.
public  String[]getMonths()
     Gets month strings.
public  String[]getShortMonths()
     Gets short month strings.
public  String[]getShortWeekdays()
     Gets short weekday strings.
public  String[]getWeekdays()
     Gets weekday strings.
final  intgetZoneIndex(String ID)
     Package private: used by SimpleDateFormat Gets the index for the given time zone ID to obtain the timezone strings for formatting.
public  String[][]getZoneStrings()
     Gets timezone strings.
public  inthashCode()
     Override hashCode.
public  voidsetAmPmStrings(String[] newAmpms)
     Sets ampm strings.
public  voidsetEras(String[] newEras)
     Sets era strings.
public  voidsetLocalPatternChars(String newLocalPatternChars)
     Sets localized date-time pattern characters.
public  voidsetMonths(String[] newMonths)
     Sets month strings.
public  voidsetShortMonths(String[] newShortMonths)
     Sets short month strings.
public  voidsetShortWeekdays(String[] newShortWeekdays)
     Sets short weekday strings.
public  voidsetWeekdays(String[] newWeekdays)
     Sets weekday strings.
public  voidsetZoneStrings(String[][] newZoneStrings)
     Sets timezone strings.

Field Detail
ampms
String ampms(Code)
AM and PM strings. For example: "AM" and "PM". An array of 2 strings, indexed by Calendar.AM and Calendar.PM.



eras
String eras(Code)
Era strings. For example: "AD" and "BC". An array of 2 strings, indexed by Calendar.BC and Calendar.AD.



localPatternChars
String localPatternChars(Code)
Localized date-time pattern characters. For example, a locale may wish to use 'u' rather than 'y' to represent years in its date format pattern strings. This string must be exactly 18 characters long, with the index of the characters described by DateFormat.ERA_FIELD, DateFormat.YEAR_FIELD, etc. Thus, if the string were "Xz...", then localized patterns would use 'X' for era and 'z' for year.



millisPerHour
final static int millisPerHour(Code)
Useful constant for defining timezone offsets.



months
String months(Code)
Month strings. For example: "January", "February", etc. An array of 13 strings (some calendars have 13 months), indexed by Calendar.JANUARY, Calendar.FEBRUARY, etc.



patternChars
final static String patternChars(Code)
Unlocalized date-time pattern characters. For example: 'y', 'd', etc. All locales use the same these unlocalized pattern characters.



serialVersionUID
final static long serialVersionUID(Code)



shortMonths
String shortMonths(Code)
Short month strings. For example: "Jan", "Feb", etc. An array of 13 strings (some calendars have 13 months), indexed by Calendar.JANUARY, Calendar.FEBRUARY, etc.



shortWeekdays
String shortWeekdays(Code)
Short weekday strings. For example: "Sun", "Mon", etc. An array of 8 strings, indexed by Calendar.SUNDAY, Calendar.MONDAY, etc. The element shortWeekdays[0] is ignored.



weekdays
String weekdays(Code)
Weekday strings. For example: "Sunday", "Monday", etc. An array of 8 strings, indexed by Calendar.SUNDAY, Calendar.MONDAY, etc. The element weekdays[0] is ignored.



zoneStrings
String zoneStrings(Code)
Localized names of time zones in this locale. This is a two-dimensional array of strings of size n by m, where m is at least 5. Each of the n rows is an entry containing the localized names for a single TimeZone. Each such row contains (with i ranging from 0..n-1):
  • zoneStrings[i][0] - time zone ID
  • zoneStrings[i][1] - long name of zone in standard time
  • zoneStrings[i][2] - short name of zone in standard time
  • zoneStrings[i][3] - long name of zone in daylight savings time
  • zoneStrings[i][4] - short name of zone in daylight savings time
The zone ID is not localized; it corresponds to the ID value associated with a system time zone object. All other entries are localized names. If a zone does not implement daylight savings time, the daylight savings time names are ignored.
See Also:   java.util.TimeZone




Constructor Detail
DateFormatSymbols
public DateFormatSymbols()(Code)
Construct a DateFormatSymbols object by loading format data from resources for the default locale.
exception:
  java.util.MissingResourceException - if the resources for the default locale cannot befound or cannot be loaded.



DateFormatSymbols
public DateFormatSymbols(Locale locale)(Code)
Construct a DateFormatSymbols object by loading format data from resources for the given locale.
exception:
  java.util.MissingResourceException - if the resources for the specified locale cannot befound or cannot be loaded.




Method Detail
clone
public Object clone()(Code)
Overrides Cloneable



equals
public boolean equals(Object obj)(Code)
Override equals



getAmPmStrings
public String[] getAmPmStrings()(Code)
Gets ampm strings. For example: "AM" and "PM". the ampm strings.



getEras
public String[] getEras()(Code)
Gets era strings. For example: "AD" and "BC". the era strings.



getLocalPatternChars
public String getLocalPatternChars()(Code)
Gets localized date-time pattern characters. For example: 'u', 't', etc. the localized date-time pattern characters.



getMonths
public String[] getMonths()(Code)
Gets month strings. For example: "January", "February", etc. the month strings.



getShortMonths
public String[] getShortMonths()(Code)
Gets short month strings. For example: "Jan", "Feb", etc. the short month strings.



getShortWeekdays
public String[] getShortWeekdays()(Code)
Gets short weekday strings. For example: "Sun", "Mon", etc. the short weekday strings. Use Calendar.SUNDAY,Calendar.MONDAY, etc. to index the result array.



getWeekdays
public String[] getWeekdays()(Code)
Gets weekday strings. For example: "Sunday", "Monday", etc. the weekday strings. Use Calendar.SUNDAY,Calendar.MONDAY, etc. to index the result array.



getZoneIndex
final int getZoneIndex(String ID)(Code)
Package private: used by SimpleDateFormat Gets the index for the given time zone ID to obtain the timezone strings for formatting. The time zone ID is just for programmatic lookup. NOT LOCALIZED!!!
Parameters:
  ID - the given time zone ID. the index of the given time zone ID. Returns -1 ifthe given time zone ID can't be located in the DateFormatSymbols object.
See Also:   java.util.SimpleTimeZone



getZoneStrings
public String[][] getZoneStrings()(Code)
Gets timezone strings. the timezone strings.



hashCode
public int hashCode()(Code)
Override hashCode. Generates a hash code for the DateFormatSymbols object.



setAmPmStrings
public void setAmPmStrings(String[] newAmpms)(Code)
Sets ampm strings. For example: "AM" and "PM".
Parameters:
  newAmpms - the new ampm strings.



setEras
public void setEras(String[] newEras)(Code)
Sets era strings. For example: "AD" and "BC".
Parameters:
  newEras - the new era strings.



setLocalPatternChars
public void setLocalPatternChars(String newLocalPatternChars)(Code)
Sets localized date-time pattern characters. For example: 'u', 't', etc.
Parameters:
  newLocalPatternChars - the new localized date-timepattern characters.



setMonths
public void setMonths(String[] newMonths)(Code)
Sets month strings. For example: "January", "February", etc.
Parameters:
  newMonths - the new month strings.



setShortMonths
public void setShortMonths(String[] newShortMonths)(Code)
Sets short month strings. For example: "Jan", "Feb", etc.
Parameters:
  newShortMonths - the new short month strings.



setShortWeekdays
public void setShortWeekdays(String[] newShortWeekdays)(Code)
Sets short weekday strings. For example: "Sun", "Mon", etc.
Parameters:
  newShortWeekdays - the new short weekday strings. The array shouldbe indexed by Calendar.SUNDAY,Calendar.MONDAY, etc.



setWeekdays
public void setWeekdays(String[] newWeekdays)(Code)
Sets weekday strings. For example: "Sunday", "Monday", etc.
Parameters:
  newWeekdays - the new weekday strings. The array shouldbe indexed by Calendar.SUNDAY,Calendar.MONDAY, etc.



setZoneStrings
public void setZoneStrings(String[][] newZoneStrings)(Code)
Sets timezone strings.
Parameters:
  newZoneStrings - the new timezone strings.



Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.