<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.text.DateFormat
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.text.html">This Package</a>  <a href="java.text.Collator.html#_top_">Previous</a>  <a href="java.text.DateFormatSymbols.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.text.DateFormat
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----<a href="java.text.Format.html#_top_">java.text.Format</a>
           |
           +----java.text.DateFormat
</pre>
<hr>
<dl>
  <dt> public abstract class <b>DateFormat</b>
  <dt> extends <a href="java.text.Format.html#_top_">Format</a>
  <dt> implements <a href="java.lang.Cloneable.html#_top_">Cloneable</a>
</dl>
DateFormat is an abstract class for date/time formatting subclasses which
 formats and parses dates or time in a language-independent manner.
 The date/time formatting subclass, such as SimpleDateFormat, allows for
 formatting (i.e., date -> text), parsing (text -> date), and
 normalization.  The date is represented as a <code>Date</code> object or
 as the milliseconds since January 1, 1970, 00:00:00 GMT.
 <p>DateFormat provides many class methods for obtaining default date/time
 formatters based on the default or a given loacle and a number of formatting
 styles. The formatting styles include FULL, LONG, MEDIUM, and SHORT. More
 detail and examples of using these styles are provided in the method
 descriptions.
 <p>DateFormat helps you to format and parse dates for any locale.
 Your code can be completely independent of the locale conventions for
 months, days of the week, or even the calendar format: lunar vs. solar.
 <p>To format a date for the current Locale, use one of the
 static factory methods:
 <pre>
  myString = DateFormat.getDateInstance().format(myDate);
 </pre>
 <p>If you are formatting multiple numbers, it is
 more efficient to get the format and use it multiple times so that
 the system doesn't have to fetch the information about the local
 language and country conventions multiple times.
 <pre>
  DateFormat df = DateFormat.getDateInstance();
  for (int i = 0; i < a.length; ++i) {
    output.println(df.format(myDate[i]) + "; ");
  }
 </pre>
 <p>To format a number for a different Locale, specify it in the
 call to getDateInstance().
 <pre>
  DateFormat df = DateFormat.getDateInstance(Locale.FRANCE);
 </pre>
 <p>You can use a DateFormat to parse also.
 <pre>
  myDate = df.parse(myString);
 </pre>
 <p>Use getDate to get the normal date format for that country.
 There are other static factory methods available.
 Use getTime to get the time format for that country.
 Use getDateTime to get a date and time format. You can pass in different
 options to these factory methods to control the length of the
 result; from SHORT to MEDIUM to LONG to FULL. The exact result depends
 on the locale, but generally:
 <ul><li>SHORT is completely numeric, such as 12.13.52 or 3:30pm
 <li>MEDIUM is longer, such as Jan 12, 1952
 <li>LONG is longer, such as January 12, 1952 or 3:30:32pm
 <li>FULL is pretty completely specified, such as
 Tuesday, April 12, 1952 AD or 3:30:42pm PST.
 </ul>
 <p>You can also set the time zone on the format if you wish.
 If you want even more control over the format or parsing,
 (or want to give your users more control),
 you can try casting the DateFormat you get from the factory methods
 to a SimpleDateFormat. This will work for the majority
 of countries; just remember to put it in a try block in case you
 encounter an unusual one.
 <p>You can also use forms of the parse and format methods with
 ParsePosition and FieldPosition to
 allow you to
 <ul><li>pregressively parse through pieces of a string.
 <li>align any particular field, or find out where it is for selection
 on the screen.
 </ul>
<p>
<dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.text.Format.html#_top_">Format</a>, <a href="java.text.NumberFormat.html#_top_">NumberFormat</a>, <a href="java.text.SimpleDateFormat.html#_top_">SimpleDateFormat</a>, <a href="java.util.Calendar.html#_top_">Calendar</a>, <a href="java.util.GregorianCalendar.html#_top_">GregorianCalendar</a>, <a href="java.util.TimeZone.html#_top_">TimeZone</a>
</dl>
<hr>
<a name="index"></a>
<h2>
  <img src="images/variable-index.gif" width=207 height=38 alt="Variable Index">
</h2>
<dl>
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#AM_PM_FIELD"><b>AM_PM_FIELD</b></a>
  <dd>  Useful constant for AM_PM field alignment.
  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#calendar"><b>calendar</b></a>
  <dd>  The calendar that DateFormat uses to produce the time field values
 needed to implement date/time formatting.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#DATE_FIELD"><b>DATE_FIELD</b></a>
  <dd>  Useful constant for DATE field alignment.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#DAY_OF_WEEK_FIELD"><b>DAY_OF_WEEK_FIELD</b></a>
  <dd>  Useful constant for DAY_OF_WEEK field alignment.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#DAY_OF_WEEK_IN_MONTH_FIELD"><b>DAY_OF_WEEK_IN_MONTH_FIELD</b></a>
  <dd>  Useful constant for DAY_OF_WEEK_IN_MONTH field alignment.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#DAY_OF_YEAR_FIELD"><b>DAY_OF_YEAR_FIELD</b></a>
  <dd>  Useful constant for DAY_OF_YEAR field alignment.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#DEFAULT"><b>DEFAULT</b></a>
  <dd>  Constant for default style pattern.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#ERA_FIELD"><b>ERA_FIELD</b></a>
  <dd>  Useful constant for ERA field alignment.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#FULL"><b>FULL</b></a>
  <dd>  Constant for full style pattern.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#HOUR0_FIELD"><b>HOUR0_FIELD</b></a>
  <dd>  Useful constant for zero-based HOUR field alignment.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#HOUR1_FIELD"><b>HOUR1_FIELD</b></a>
  <dd>  Useful constant for one-based HOUR field alignment.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#HOUR_OF_DAY0_FIELD"><b>HOUR_OF_DAY0_FIELD</b></a>
  <dd>  Useful constant for zero-based HOUR_OF_DAY field alignment.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#HOUR_OF_DAY1_FIELD"><b>HOUR_OF_DAY1_FIELD</b></a>
  <dd>  Useful constant for one-based HOUR_OF_DAY field alignment.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#LONG"><b>LONG</b></a>
  <dd>  Constant for long style pattern.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#MEDIUM"><b>MEDIUM</b></a>
  <dd>  Constant for medium style pattern.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#MILLISECOND_FIELD"><b>MILLISECOND_FIELD</b></a>
  <dd>  Useful constant for MILLISECOND field alignment.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#MINUTE_FIELD"><b>MINUTE_FIELD</b></a>
  <dd>  Useful constant for MINUTE field alignment.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#MONTH_FIELD"><b>MONTH_FIELD</b></a>
  <dd>  Useful constant for MONTH field alignment.
  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#numberFormat"><b>numberFormat</b></a>
  <dd>  The number formatter that DateFormat uses to format numbers in dates
 and times.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#SECOND_FIELD"><b>SECOND_FIELD</b></a>
  <dd>  Useful constant for SECOND field alignment.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#SHORT"><b>SHORT</b></a>
  <dd>  Constant for short style pattern.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#TIMEZONE_FIELD"><b>TIMEZONE_FIELD</b></a>
  <dd>  Useful constant for TIMEZONE field alignment.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#WEEK_OF_MONTH_FIELD"><b>WEEK_OF_MONTH_FIELD</b></a>
  <dd>  Useful constant for WEEK_OF_MONTH field alignment.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#WEEK_OF_YEAR_FIELD"><b>WEEK_OF_YEAR_FIELD</b></a>
  <dd>  Useful constant for WEEK_OF_YEAR field alignment.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#YEAR_FIELD"><b>YEAR_FIELD</b></a>
  <dd>  Useful constant for YEAR field alignment.
</dl>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#DateFormat()"><b>DateFormat</b></a>()
  <dd> 
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#clone()"><b>clone</b></a>()
  <dd>  Overrides Cloneable

  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#equals(java.lang.Object)"><b>equals</b></a>(Object)
  <dd>  Overrides equals

  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#format(java.util.Date)"><b>format</b></a>(Date)
  <dd>  Formats a Date into a date/time string.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#format(java.util.Date, java.lang.StringBuffer, java.text.FieldPosition)"><b>format</b></a>(Date, StringBuffer, FieldPosition)
  <dd>  Formats a Date into a date/time string.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)"><b>format</b></a>(Object, StringBuffer, FieldPosition)
  <dd>  Overrides Format.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getAvailableLocales()"><b>getAvailableLocales</b></a>()
  <dd>  Gets the set of locales for which DateFormats are installed.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getCalendar()"><b>getCalendar</b></a>()
  <dd>  Gets the calendar associated with this date/time formatter.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getDateInstance()"><b>getDateInstance</b></a>()
  <dd>  Gets the date formatter with the default formatting style
 for the default locale.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getDateInstance(int)"><b>getDateInstance</b></a>(int)
  <dd>  Gets the date formatter with the given formatting style
 for the default locale.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getDateInstance(int, java.util.Locale)"><b>getDateInstance</b></a>(int, Locale)
  <dd>  Gets the date formatter with the given formatting style
 for the given locale.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getDateTimeInstance()"><b>getDateTimeInstance</b></a>()
  <dd>  Gets the date/time formatter with the default formatting style
 for the default locale.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getDateTimeInstance(int, int)"><b>getDateTimeInstance</b></a>(int, int)
  <dd>  Gets the date/time formatter with the given date and time
 formatting styles for the default locale.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getDateTimeInstance(int, int, java.util.Locale)"><b>getDateTimeInstance</b></a>(int, int, Locale)
  <dd>  Gets the date/time formatter with the given formatting styles
 for the given locale.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getInstance()"><b>getInstance</b></a>()
  <dd>  Get a default date/time formatter that uses the SHORT style for both the
 date and the time.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getNumberFormat()"><b>getNumberFormat</b></a>()
  <dd>  Gets the number formatter which this date/time formatter uses to
 format and parse a time.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getTimeInstance()"><b>getTimeInstance</b></a>()
  <dd>  Gets the time formatter with the default formatting style
 for the default locale.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getTimeInstance(int)"><b>getTimeInstance</b></a>(int)
  <dd>  Gets the time formatter with the given formatting style
 for the default locale.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getTimeInstance(int, java.util.Locale)"><b>getTimeInstance</b></a>(int, Locale)
  <dd>  Gets the time formatter with the given formatting style
 for the given locale.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getTimeZone()"><b>getTimeZone</b></a>()
  <dd>  Gets the time zone.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#hashCode()"><b>hashCode</b></a>()
  <dd>  Overrides hashCode

  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#isLenient()"><b>isLenient</b></a>()
  <dd>  Tell whether date/time parsing is to be lenient.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#parse(java.lang.String)"><b>parse</b></a>(String)
  <dd>  Parse a date/time string.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#parse(java.lang.String, java.text.ParsePosition)"><b>parse</b></a>(String, ParsePosition)
  <dd>  Parse a date/time string according to the given parse position.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#parseObject(java.lang.String, java.text.ParsePosition)"><b>parseObject</b></a>(String, ParsePosition)
  <dd>  Parse a date/time string into an Object.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setCalendar(java.util.Calendar)"><b>setCalendar</b></a>(Calendar)
  <dd>  Set the calendar to be used by this date format.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setLenient(boolean)"><b>setLenient</b></a>(boolean)
  <dd>  Specify whether or not date/time parsing is to be lenient.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setNumberFormat(java.text.NumberFormat)"><b>setNumberFormat</b></a>(NumberFormat)
  <dd>  Allows you to set the number formatter.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setTimeZone(java.util.TimeZone)"><b>setTimeZone</b></a>(TimeZone)
  <dd>  Sets the time zone for the calendar of this DateFormat object.
</dl>
<a name="variables"></a>
<h2>
  <img src="images/variables.gif" width=153 height=38 alt="Variables">
</h2>
<a name="calendar"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
<b>calendar</b>
<pre>
 protected <a href="java.util.Calendar.html#_top_">Calendar</a> calendar
</pre>
<dl>
  <dd> The calendar that DateFormat uses to produce the time field values
 needed to implement date/time formatting.  Subclasses should initialize
 this to the default calendar for the locale associated with this
 DateFormat.<p>
</dl>
<a name="numberFormat"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
<b>numberFormat</b>
<pre>
 protected <a href="java.text.NumberFormat.html#_top_">NumberFormat</a> numberFormat
</pre>
<dl>
  <dd> The number formatter that DateFormat uses to format numbers in dates
 and times.  Subclasses should initialize this to the default number
 format for the locale associated with this DateFormat.<p>
</dl>
<a name="ERA_FIELD"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>ERA_FIELD</b>
<pre>
 public static final int ERA_FIELD
</pre>
<dl>
  <dd> Useful constant for ERA field alignment.
 Used in FieldPosition of date/time formatting.<p>
</dl>
<a name="YEAR_FIELD"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>YEAR_FIELD</b>
<pre>
 public static final int YEAR_FIELD
</pre>
<dl>
  <dd> Useful constant for YEAR field alignment.
 Used in FieldPosition of date/time formatting.<p>
</dl>
<a name="MONTH_FIELD"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>MONTH_FIELD</b>
<pre>
 public static final int MONTH_FIELD
</pre>
<dl>
  <dd> Useful constant for MONTH field alignment.
 Used in FieldPosition of date/time formatting.<p>
</dl>
<a name="DATE_FIELD"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>DATE_FIELD</b>
<pre>
 public static final int DATE_FIELD
</pre>
<dl>
  <dd> Useful constant for DATE field alignment.
 Used in FieldPosition of date/time formatting.<p>
</dl>
<a name="HOUR_OF_DAY1_FIELD"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>HOUR_OF_DAY1_FIELD</b>
<pre>
 public static final int HOUR_OF_DAY1_FIELD
</pre>
<dl>
  <dd> Useful constant for one-based HOUR_OF_DAY field alignment.
 Used in FieldPosition of date/time formatting.
 HOUR_OF_DAY1_FIELD is used for the one-based 24-hour clock.
 For example, 23:59 + 01:00 results in 24:59.<p>
</dl>
<a name="HOUR_OF_DAY0_FIELD"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>HOUR_OF_DAY0_FIELD</b>
<pre>
 public static final int HOUR_OF_DAY0_FIELD
</pre>
<dl>
  <dd> Useful constant for zero-based HOUR_OF_DAY field alignment.
 Used in FieldPosition of date/time formatting.
 HOUR_OF_DAY0_FIELD is used for the zero-based 24-hour clock.
 For example, 23:59 + 01:00 results in 00:59.<p>
</dl>
<a name="MINUTE_FIELD"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>MINUTE_FIELD</b>
<pre>
 public static final int MINUTE_FIELD
</pre>
<dl>
  <dd> Useful constant for MINUTE field alignment.
 Used in FieldPosition of date/time formatting.<p>
</dl>
<a name="SECOND_FIELD"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>SECOND_FIELD</b>
<pre>
 public static final int SECOND_FIELD
</pre>
<dl>
  <dd> Useful constant for SECOND field alignment.
 Used in FieldPosition of date/time formatting.<p>
</dl>
<a name="MILLISECOND_FIELD"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>MILLISECOND_FIELD</b>
<pre>
 public static final int MILLISECOND_FIELD
</pre>
<dl>
  <dd> Useful constant for MILLISECOND field alignment.
 Used in FieldPosition of date/time formatting.<p>
</dl>
<a name="DAY_OF_WEEK_FIELD"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>DAY_OF_WEEK_FIELD</b>
<pre>
 public static final int DAY_OF_WEEK_FIELD
</pre>
<dl>
  <dd> Useful constant for DAY_OF_WEEK field alignment.
 Used in FieldPosition of date/time formatting.<p>
</dl>
<a name="DAY_OF_YEAR_FIELD"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>DAY_OF_YEAR_FIELD</b>
<pre>
 public static final int DAY_OF_YEAR_FIELD
</pre>
<dl>
  <dd> Useful constant for DAY_OF_YEAR field alignment.
 Used in FieldPosition of date/time formatting.<p>
</dl>
<a name="DAY_OF_WEEK_IN_MONTH_FIELD"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>DAY_OF_WEEK_IN_MONTH_FIELD</b>
<pre>
 public static final int DAY_OF_WEEK_IN_MONTH_FIELD
</pre>
<dl>
  <dd> Useful constant for DAY_OF_WEEK_IN_MONTH field alignment.
 Used in FieldPosition of date/time formatting.<p>
</dl>
<a name="WEEK_OF_YEAR_FIELD"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>WEEK_OF_YEAR_FIELD</b>
<pre>
 public static final int WEEK_OF_YEAR_FIELD
</pre>
<dl>
  <dd> Useful constant for WEEK_OF_YEAR field alignment.
 Used in FieldPosition of date/time formatting.<p>
</dl>
<a name="WEEK_OF_MONTH_FIELD"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>WEEK_OF_MONTH_FIELD</b>
<pre>
 public static final int WEEK_OF_MONTH_FIELD
</pre>
<dl>
  <dd> Useful constant for WEEK_OF_MONTH field alignment.
 Used in FieldPosition of date/time formatting.<p>
</dl>
<a name="AM_PM_FIELD"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>AM_PM_FIELD</b>
<pre>
 public static final int AM_PM_FIELD
</pre>
<dl>
  <dd> Useful constant for AM_PM field alignment.
 Used in FieldPosition of date/time formatting.<p>
</dl>
<a name="HOUR1_FIELD"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>HOUR1_FIELD</b>
<pre>
 public static final int HOUR1_FIELD
</pre>
<dl>
  <dd> Useful constant for one-based HOUR field alignment.
 Used in FieldPosition of date/time formatting.
 HOUR1_FIELD is used for the one-based 12-hour clock.
 For example, 11:30 PM + 1 hour results in 12:30 AM.<p>
</dl>
<a name="HOUR0_FIELD"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>HOUR0_FIELD</b>
<pre>
 public static final int HOUR0_FIELD
</pre>
<dl>
  <dd> Useful constant for zero-based HOUR field alignment.
 Used in FieldPosition of date/time formatting.
 HOUR0_FIELD is used for the zero-based 12-hour clock.
 For example, 11:30 PM + 1 hour results in 00:30 AM.<p>
</dl>
<a name="TIMEZONE_FIELD"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>TIMEZONE_FIELD</b>
<pre>
 public static final int TIMEZONE_FIELD
</pre>
<dl>
  <dd> Useful constant for TIMEZONE field alignment.
 Used in FieldPosition of date/time formatting.<p>
</dl>
<a name="FULL"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>FULL</b>
<pre>
 public static final int FULL
</pre>
<dl>
  <dd> Constant for full style pattern.<p>
</dl>
<a name="LONG"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>LONG</b>
<pre>
 public static final int LONG
</pre>
<dl>
  <dd> Constant for long style pattern.<p>
</dl>
<a name="MEDIUM"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>MEDIUM</b>
<pre>
 public static final int MEDIUM
</pre>
<dl>
  <dd> Constant for medium style pattern.<p>
</dl>
<a name="SHORT"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>SHORT</b>
<pre>
 public static final int SHORT
</pre>
<dl>
  <dd> Constant for short style pattern.<p>
</dl>
<a name="DEFAULT"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>DEFAULT</b>
<pre>
 public static final int DEFAULT
</pre>
<dl>
  <dd> Constant for default style pattern.<p>
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="DateFormat"></a>
<a name="DateFormat()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>DateFormat</b>
<pre>
 protected DateFormat()
</pre>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="format"><b>format</b></a>
<pre>
 public final <a href="java.lang.StringBuffer.html#_top_">StringBuffer</a> format(<a href="java.lang.Object.html#_top_">Object</a> obj,
                                  <a href="java.lang.StringBuffer.html#_top_">StringBuffer</a> toAppendTo,
                                  <a href="java.text.FieldPosition.html#_top_">FieldPosition</a> fieldPosition)
</pre>
<dl>
  <dd> Overrides Format.
 Formats a time object into a time string. Examples of time objects
 are a time value expressed in milliseconds and a Date object.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> obj - must be a Number or a Date.
    <dd> toAppendTo - the string buffer for the returning time string.
    <dd> status - the formatting status. On input: an alignment field,
 if desired. On output: the offsets of the alignment field.
    <dt> <b>Returns:</b>
    <dd> the formatted time string.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.text.Format.html#format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)">format</a> in class <a href="java.text.Format.html#_top_">Format</a>
    <dt> <b>See Also:</b>
    <dd> Format
  </dl></dd>
</dl>
<a name="format(java.util.Date, java.lang.StringBuffer, java.text.FieldPosition)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="format"><b>format</b></a>
<pre>
 public abstract <a href="java.lang.StringBuffer.html#_top_">StringBuffer</a> format(<a href="java.util.Date.html#_top_">Date</a> date,
                                     <a href="java.lang.StringBuffer.html#_top_">StringBuffer</a> toAppendTo,
                                     <a href="java.text.FieldPosition.html#_top_">FieldPosition</a> fieldPosition)
</pre>
<dl>
  <dd> Formats a Date into a date/time string.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> date - a Date to be formatted into a date/time string.
    <dd> toAppendTo - the string buffer for the returning date/time string.
    <dd> status - the formatting status. On input: an alignment field,
 if desired. On output: the offsets of the alignment field. For
 example, given a time text "1996.07.10 AD at 15:08:56 PDT",
 if the given status.field is DateFormat.YEAR_FIELD, the offsets
 status.beginIndex and status.getEndIndex will be set to 0 and 4,
 respectively. Notice that if the same time field appears
 more than once in a pattern, the status will be set for the first
 occurence of that time field. For instance, formatting a Date to
 the time string "1 PM PDT (Pacific Daylight Time)" using the pattern
 "h a z (zzzz)" and the alignment field DateFormat.TIMEZONE_FIELD,
 the offsets status.beginIndex and status.getEndIndex will be set to
 5 and 8, respectively, for the first occurence of the timezone
 pattern character 'z'.
    <dt> <b>Returns:</b>
    <dd> the formatted date/time string.
  </dl></dd>
</dl>
<a name="format(java.util.Date)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="format"><b>format</b></a>
<pre>
 public final <a href="java.lang.String.html#_top_">String</a> format(<a href="java.util.Date.html#_top_">Date</a> date)
</pre>
<dl>
  <dd> Formats a Date into a date/time string.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> date - the time value to be formatted into a time string.
    <dt> <b>Returns:</b>
    <dd> the formatted time string.
  </dl></dd>
</dl>
<a name="parse(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="parse"><b>parse</b></a>
<pre>
 public <a href="java.util.Date.html#_top_">Date</a> parse(<a href="java.lang.String.html#_top_">String</a> text) throws <a href="java.text.ParseException.html#_top_">ParseException</a>
</pre>
<dl>
  <dd> Parse a date/time string.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.text.ParseException.html#_top_">ParseException</a>
    <dd> If the given string cannot be parsed as a date.
    <dt> <b>See Also:</b>
    <dd> <a href="#parse(String, ParsePosition)">parse</a>
  </dl></dd>
</dl>
<a name="parse(java.lang.String, java.text.ParsePosition)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="parse"><b>parse</b></a>
<pre>
 public abstract <a href="java.util.Date.html#_top_">Date</a> parse(<a href="java.lang.String.html#_top_">String</a> text,
                            <a href="java.text.ParsePosition.html#_top_">ParsePosition</a> pos)
</pre>
<dl>
  <dd> Parse a date/time string according to the given parse position.  For
 example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Date
 that is equivalent to Date(837039928046).
 <p> By default, parsing is lenient: If the input is not in the form used
 by this object's format method but can still be parsed as a date, then
 the parse succeeds.  Clients may insist on strict adherence to the
 format by calling setLenient(false).
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> text - The date/time string to be parsed
    <dd> pos - On input, the position at which to start parsing; on
              output, the position at which parsing terminated, or the
              start position if the parse failed.
    <dt> <b>Returns:</b>
    <dd> A Date, or null if the input could not be parsed
    <dt> <b>See Also:</b>
    <dd> <a href="#setLenient(boolean)">setLenient</a>
  </dl></dd>
</dl>
<a name="parseObject(java.lang.String, java.text.ParsePosition)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="parseObject"><b>parseObject</b></a>
<pre>
 public <a href="java.lang.Object.html#_top_">Object</a> parseObject(<a href="java.lang.String.html#_top_">String</a> source,
                           <a href="java.text.ParsePosition.html#_top_">ParsePosition</a> pos)
</pre>
<dl>
  <dd> Parse a date/time string into an Object.  This convenience method simply
 calls parse(String, ParsePosition).
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.text.Format.html#parseObject(java.lang.String, java.text.ParsePosition)">parseObject</a> in class <a href="java.text.Format.html#_top_">Format</a>
    <dt> <b>See Also:</b>
    <dd> <a href="#parse(String, ParsePosition)">parse</a>
  </dl></dd>
</dl>
<a name="getTimeInstance()"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getTimeInstance"><b>getTimeInstance</b></a>
<pre>
 public static final <a href="#_top_">DateFormat</a> getTimeInstance()
</pre>
<dl>
  <dd> Gets the time formatter with the default formatting style
 for the default locale.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a time formatter.
  </dl></dd>
</dl>
<a name="getTimeInstance(int)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getTimeInstance"><b>getTimeInstance</b></a>
<pre>
 public static final <a href="#_top_">DateFormat</a> getTimeInstance(int style)
</pre>
<dl>
  <dd> Gets the time formatter with the given formatting style
 for the default locale.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> style - the given formatting style. For example,
 SHORT for "h:mm a" in the US locale.
    <dt> <b>Returns:</b>
    <dd> a time formatter.
  </dl></dd>
</dl>
<a name="getTimeInstance(int, java.util.Locale)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getTimeInstance"><b>getTimeInstance</b></a>
<pre>
 public static final <a href="#_top_">DateFormat</a> getTimeInstance(int style,
                                                <a href="java.util.Locale.html#_top_">Locale</a> aLocale)
</pre>
<dl>
  <dd> Gets the time formatter with the given formatting style
 for the given locale.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> style - the given formatting style. For example,
 SHORT for "h:mm a" in the US locale.
    <dd> inLocale - the given locale.
    <dt> <b>Returns:</b>
    <dd> a time formatter.
  </dl></dd>
</dl>
<a name="getDateInstance()"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getDateInstance"><b>getDateInstance</b></a>
<pre>
 public static final <a href="#_top_">DateFormat</a> getDateInstance()
</pre>
<dl>
  <dd> Gets the date formatter with the default formatting style
 for the default locale.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a date formatter.
  </dl></dd>
</dl>
<a name="getDateInstance(int)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getDateInstance"><b>getDateInstance</b></a>
<pre>
 public static final <a href="#_top_">DateFormat</a> getDateInstance(int style)
</pre>
<dl>
  <dd> Gets the date formatter with the given formatting style
 for the default locale.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> style - the given formatting style. For example,
 SHORT for "M/d/yy" in the US locale.
    <dt> <b>Returns:</b>
    <dd> a date formatter.
  </dl></dd>
</dl>
<a name="getDateInstance(int, java.util.Locale)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getDateInstance"><b>getDateInstance</b></a>
<pre>
 public static final <a href="#_top_">DateFormat</a> getDateInstance(int style,
                                                <a href="java.util.Locale.html#_top_">Locale</a> aLocale)
</pre>
<dl>
  <dd> Gets the date formatter with the given formatting style
 for the given locale.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> style - the given formatting style. For example,
 SHORT for "M/d/yy" in the US locale.
    <dd> inLocale - the given locale.
    <dt> <b>Returns:</b>
    <dd> a date formatter.
  </dl></dd>
</dl>
<a name="getDateTimeInstance()"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getDateTimeInstance"><b>getDateTimeInstance</b></a>
<pre>
 public static final <a href="#_top_">DateFormat</a> getDateTimeInstance()
</pre>
<dl>
  <dd> Gets the date/time formatter with the default formatting style
 for the default locale.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a date/time formatter.
  </dl></dd>
</dl>
<a name="getDateTimeInstance(int, int)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getDateTimeInstance"><b>getDateTimeInstance</b></a>
<pre>
 public static final <a href="#_top_">DateFormat</a> getDateTimeInstance(int dateStyle,
                                                    int timeStyle)
</pre>
<dl>
  <dd> Gets the date/time formatter with the given date and time
 formatting styles for the default locale.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> dateStyle - the given date formatting style. For example,
 SHORT for "M/d/yy" in the US locale.
    <dd> timeStyle - the given time formatting style. For example,
 SHORT for "h:mm a" in the US locale.
    <dt> <b>Returns:</b>
    <dd> a date/time formatter.
  </dl></dd>
</dl>
<a name="getDateTimeInstance(int, int, java.util.Locale)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getDateTimeInstance"><b>getDateTimeInstance</b></a>
<pre>
 public static final <a href="#_top_">DateFormat</a> getDateTimeInstance(int dateStyle,
                                                    int timeStyle,
                                                    <a href="java.util.Locale.html#_top_">Locale</a> aLocale)
</pre>
<dl>
  <dd> Gets the date/time formatter with the given formatting styles
 for the given locale.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> dateStyle - the given date formatting style.
    <dd> timeStyle - the given time formatting style.
    <dd> inLocale - the given locale.
    <dt> <b>Returns:</b>
    <dd> a date/time formatter.
  </dl></dd>
</dl>
<a name="getInstance()"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getInstance"><b>getInstance</b></a>
<pre>
 public static final <a href="#_top_">DateFormat</a> getInstance()
</pre>
<dl>
  <dd> Get a default date/time formatter that uses the SHORT style for both the
 date and the time.
<p>
</dl>
<a name="getAvailableLocales()"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getAvailableLocales"><b>getAvailableLocales</b></a>
<pre>
 public static <a href="java.util.Locale.html#_top_">Locale</a>[] getAvailableLocales()
</pre>
<dl>
  <dd> Gets the set of locales for which DateFormats are installed.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the set of locales for which DateFormats are installed.
  </dl></dd>
</dl>
<a name="setCalendar(java.util.Calendar)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setCalendar"><b>setCalendar</b></a>
<pre>
 public void setCalendar(<a href="java.util.Calendar.html#_top_">Calendar</a> newCalendar)
</pre>
<dl>
  <dd> Set the calendar to be used by this date format.  Initially, the default
 calendar for the specified or default locale is used.
<p>
</dl>
<a name="getCalendar()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getCalendar"><b>getCalendar</b></a>
<pre>
 public <a href="java.util.Calendar.html#_top_">Calendar</a> getCalendar()
</pre>
<dl>
  <dd> Gets the calendar associated with this date/time formatter.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the calendar associated with this date/time formatter.
  </dl></dd>
</dl>
<a name="setNumberFormat(java.text.NumberFormat)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setNumberFormat"><b>setNumberFormat</b></a>
<pre>
 public void setNumberFormat(<a href="java.text.NumberFormat.html#_top_">NumberFormat</a> newNumberFormat)
</pre>
<dl>
  <dd> Allows you to set the number formatter.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> newNumberFormat - the given new NumberFormat.
  </dl></dd>
</dl>
<a name="getNumberFormat()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getNumberFormat"><b>getNumberFormat</b></a>
<pre>
 public <a href="java.text.NumberFormat.html#_top_">NumberFormat</a> getNumberFormat()
</pre>
<dl>
  <dd> Gets the number formatter which this date/time formatter uses to
 format and parse a time.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the number formatter which this date/time formatter uses.
  </dl></dd>
</dl>
<a name="setTimeZone(java.util.TimeZone)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setTimeZone"><b>setTimeZone</b></a>
<pre>
 public void setTimeZone(<a href="java.util.TimeZone.html#_top_">TimeZone</a> zone)
</pre>
<dl>
  <dd> Sets the time zone for the calendar of this DateFormat object.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> zone - the given new time zone.
  </dl></dd>
</dl>
<a name="getTimeZone()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getTimeZone"><b>getTimeZone</b></a>
<pre>
 public <a href="java.util.TimeZone.html#_top_">TimeZone</a> getTimeZone()
</pre>
<dl>
  <dd> Gets the time zone.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the time zone associated with the calendar of DateFormat.
  </dl></dd>
</dl>
<a name="setLenient(boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setLenient"><b>setLenient</b></a>
<pre>
 public void setLenient(boolean lenient)
</pre>
<dl>
  <dd> Specify whether or not date/time parsing is to be lenient.  With
 lenient parsing, the parser may use heuristics to interpret inputs that
 do not precisely match this object's format.  With strict parsing,
 inputs must match this object's format.
<p>
  <dd><dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.util.Calendar.html#setLenient">setLenient</a>
  </dl></dd>
</dl>
<a name="isLenient()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="isLenient"><b>isLenient</b></a>
<pre>
 public boolean isLenient()
</pre>
<dl>
  <dd> Tell whether date/time parsing is to be lenient.
<p>
</dl>
<a name="hashCode()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="hashCode"><b>hashCode</b></a>
<pre>
 public int hashCode()
</pre>
<dl>
  <dd> Overrides hashCode
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#hashCode()">hashCode</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<a name="equals(java.lang.Object)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="equals"><b>equals</b></a>
<pre>
 public boolean equals(<a href="java.lang.Object.html#_top_">Object</a> obj)
</pre>
<dl>
  <dd> Overrides equals
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#equals(java.lang.Object)">equals</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<a name="clone()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="clone"><b>clone</b></a>
<pre>
 public <a href="java.lang.Object.html#_top_">Object</a> clone()
</pre>
<dl>
  <dd> Overrides Cloneable
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.text.Format.html#clone()">clone</a> in class <a href="java.text.Format.html#_top_">Format</a>
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.text.html">This Package</a>  <a href="java.text.Collator.html#_top_">Previous</a>  <a href="java.text.DateFormatSymbols.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
