代码拉取完成,页面将自动刷新
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.6.0_18) on Fri Sep 26 17:01:27 PDT 2014 -->
<title>DateFormat (Java Platform SE 7 )</title>
<meta name="date" content="2014-09-26">
<meta name="keywords" content="java.text.DateFormat class">
<meta name="keywords" content="calendar">
<meta name="keywords" content="numberFormat">
<meta name="keywords" content="ERA_FIELD">
<meta name="keywords" content="YEAR_FIELD">
<meta name="keywords" content="MONTH_FIELD">
<meta name="keywords" content="DATE_FIELD">
<meta name="keywords" content="HOUR_OF_DAY1_FIELD">
<meta name="keywords" content="HOUR_OF_DAY0_FIELD">
<meta name="keywords" content="MINUTE_FIELD">
<meta name="keywords" content="SECOND_FIELD">
<meta name="keywords" content="MILLISECOND_FIELD">
<meta name="keywords" content="DAY_OF_WEEK_FIELD">
<meta name="keywords" content="DAY_OF_YEAR_FIELD">
<meta name="keywords" content="DAY_OF_WEEK_IN_MONTH_FIELD">
<meta name="keywords" content="WEEK_OF_YEAR_FIELD">
<meta name="keywords" content="WEEK_OF_MONTH_FIELD">
<meta name="keywords" content="AM_PM_FIELD">
<meta name="keywords" content="HOUR1_FIELD">
<meta name="keywords" content="HOUR0_FIELD">
<meta name="keywords" content="TIMEZONE_FIELD">
<meta name="keywords" content="FULL">
<meta name="keywords" content="LONG">
<meta name="keywords" content="MEDIUM">
<meta name="keywords" content="SHORT">
<meta name="keywords" content="DEFAULT">
<meta name="keywords" content="format()">
<meta name="keywords" content="parse()">
<meta name="keywords" content="parseObject()">
<meta name="keywords" content="getTimeInstance()">
<meta name="keywords" content="getDateInstance()">
<meta name="keywords" content="getDateTimeInstance()">
<meta name="keywords" content="getInstance()">
<meta name="keywords" content="getAvailableLocales()">
<meta name="keywords" content="setCalendar()">
<meta name="keywords" content="getCalendar()">
<meta name="keywords" content="setNumberFormat()">
<meta name="keywords" content="getNumberFormat()">
<meta name="keywords" content="setTimeZone()">
<meta name="keywords" content="getTimeZone()">
<meta name="keywords" content="setLenient()">
<meta name="keywords" content="isLenient()">
<meta name="keywords" content="hashCode()">
<meta name="keywords" content="equals()">
<meta name="keywords" content="clone()">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="DateFormat (Java Platform SE 7 )";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DateFormat.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-files/index-1.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><strong>Java™ Platform<br>Standard Ed. 7</strong></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../java/text/Collator.html" title="class in java.text"><span class="strong">Prev Class</span></a></li>
<li><a href="../../java/text/DateFormat.Field.html" title="class in java.text"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?java/text/DateFormat.html" target="_top">Frames</a></li>
<li><a href="DateFormat.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li><a href="#nested_class_summary">Nested</a> | </li>
<li><a href="#field_summary">Field</a> | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field_detail">Field</a> | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">java.text</div>
<h2 title="Class DateFormat" class="title">Class DateFormat</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="../../java/lang/Object.html" title="class in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../java/text/Format.html" title="class in java.text">java.text.Format</a></li>
<li>
<ul class="inheritance">
<li>java.text.DateFormat</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../java/io/Serializable.html" title="interface in java.io">Serializable</a>, <a href="../../java/lang/Cloneable.html" title="interface in java.lang">Cloneable</a></dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../java/text/SimpleDateFormat.html" title="class in java.text">SimpleDateFormat</a></dd>
</dl>
<hr>
<br>
<pre>public abstract class <span class="strong">DateFormat</span>
extends <a href="../../java/text/Format.html" title="class in java.text">Format</a></pre>
<div class="block"><code>DateFormat</code> 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 <a href="../../java/text/SimpleDateFormat.html" title="class in java.text"><code>SimpleDateFormat</code></a>, 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><code>DateFormat</code> provides many class methods for obtaining default date/time
formatters based on the default or a given locale and a number of formatting
styles. The formatting styles include <a href="../../java/text/DateFormat.html#FULL"><code>FULL</code></a>, <a href="../../java/text/DateFormat.html#LONG"><code>LONG</code></a>, <a href="../../java/text/DateFormat.html#MEDIUM"><code>MEDIUM</code></a>, and <a href="../../java/text/DateFormat.html#SHORT"><code>SHORT</code></a>. More
detail and examples of using these styles are provided in the method
descriptions.
<p><code>DateFormat</code> 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 dates, 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 < myDate.length; ++i) {
output.println(df.format(myDate[i]) + "; ");
}
</pre>
<p>To format a date for a different Locale, specify it in the
call to <a href="../../java/text/DateFormat.html#getDateInstance(int,%20java.util.Locale)"><code>getDateInstance()</code></a>.
<pre>
DateFormat df = DateFormat.getDateInstance(DateFormat.LONG, Locale.FRANCE);
</pre>
<p>You can use a DateFormat to parse also.
<pre>
myDate = df.parse(myString);
</pre>
<p>Use <code>getDateInstance</code> to get the normal date format for that country.
There are other static factory methods available.
Use <code>getTimeInstance</code> to get the time format for that country.
Use <code>getDateTimeInstance</code> 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 <a href="../../java/text/DateFormat.html#SHORT"><code>SHORT</code></a> to <a href="../../java/text/DateFormat.html#MEDIUM"><code>MEDIUM</code></a> to <a href="../../java/text/DateFormat.html#LONG"><code>LONG</code></a> to <a href="../../java/text/DateFormat.html#FULL"><code>FULL</code></a>. The exact result depends
on the locale, but generally:
<ul><li><a href="../../java/text/DateFormat.html#SHORT"><code>SHORT</code></a> is completely numeric, such as <code>12.13.52</code> or <code>3:30pm</code>
<li><a href="../../java/text/DateFormat.html#MEDIUM"><code>MEDIUM</code></a> is longer, such as <code>Jan 12, 1952</code>
<li><a href="../../java/text/DateFormat.html#LONG"><code>LONG</code></a> is longer, such as <code>January 12, 1952</code> or <code>3:30:32pm</code>
<li><a href="../../java/text/DateFormat.html#FULL"><code>FULL</code></a> is pretty completely specified, such as
<code>Tuesday, April 12, 1952 AD or 3:30:42pm PST</code>.
</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 <code>DateFormat</code> you get from the factory methods
to a <a href="../../java/text/SimpleDateFormat.html" title="class in java.text"><code>SimpleDateFormat</code></a>. This will work for the majority
of countries; just remember to put it in a <code>try</code> block in case you
encounter an unusual one.
<p>You can also use forms of the parse and format methods with
<a href="../../java/text/ParsePosition.html" title="class in java.text"><code>ParsePosition</code></a> and <a href="../../java/text/FieldPosition.html" title="class in java.text"><code>FieldPosition</code></a> to
allow you to
<ul><li>progressively parse through pieces of a string.
<li>align any particular field, or find out where it is for selection
on the screen.
</ul>
<h4><a name="synchronization">Synchronization</a></h4>
<p>
Date formats are not synchronized.
It is recommended to create separate format instances for each thread.
If multiple threads access a format concurrently, it must be synchronized
externally.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../java/text/Format.html" title="class in java.text"><code>Format</code></a>,
<a href="../../java/text/NumberFormat.html" title="class in java.text"><code>NumberFormat</code></a>,
<a href="../../java/text/SimpleDateFormat.html" title="class in java.text"><code>SimpleDateFormat</code></a>,
<a href="../../java/util/Calendar.html" title="class in java.util"><code>Calendar</code></a>,
<a href="../../java/util/GregorianCalendar.html" title="class in java.util"><code>GregorianCalendar</code></a>,
<a href="../../java/util/TimeZone.html" title="class in java.util"><code>TimeZone</code></a>,
<a href="../../serialized-form.html#java.text.DateFormat">Serialized Form</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class </code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a></strong></code>
<div class="block">Defines constants that are used as attribute keys in the
<code>AttributedCharacterIterator</code> returned
from <code>DateFormat.formatToCharacterIterator</code> and as
field identifiers in <code>FieldPosition</code>.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#AM_PM_FIELD">AM_PM_FIELD</a></strong></code>
<div class="block">Useful constant for AM_PM field alignment.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="../../java/util/Calendar.html" title="class in java.util">Calendar</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#calendar">calendar</a></strong></code>
<div class="block">The <a href="../../java/util/Calendar.html" title="class in java.util"><code>Calendar</code></a> instance used for calculating the date-time fields
and the instant of time.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#DATE_FIELD">DATE_FIELD</a></strong></code>
<div class="block">Useful constant for DATE field alignment.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#DAY_OF_WEEK_FIELD">DAY_OF_WEEK_FIELD</a></strong></code>
<div class="block">Useful constant for DAY_OF_WEEK field alignment.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#DAY_OF_WEEK_IN_MONTH_FIELD">DAY_OF_WEEK_IN_MONTH_FIELD</a></strong></code>
<div class="block">Useful constant for DAY_OF_WEEK_IN_MONTH field alignment.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#DAY_OF_YEAR_FIELD">DAY_OF_YEAR_FIELD</a></strong></code>
<div class="block">Useful constant for DAY_OF_YEAR field alignment.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#DEFAULT">DEFAULT</a></strong></code>
<div class="block">Constant for default style pattern.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#ERA_FIELD">ERA_FIELD</a></strong></code>
<div class="block">Useful constant for ERA field alignment.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#FULL">FULL</a></strong></code>
<div class="block">Constant for full style pattern.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#HOUR_OF_DAY0_FIELD">HOUR_OF_DAY0_FIELD</a></strong></code>
<div class="block">Useful constant for zero-based HOUR_OF_DAY field alignment.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#HOUR_OF_DAY1_FIELD">HOUR_OF_DAY1_FIELD</a></strong></code>
<div class="block">Useful constant for one-based HOUR_OF_DAY field alignment.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#HOUR0_FIELD">HOUR0_FIELD</a></strong></code>
<div class="block">Useful constant for zero-based HOUR field alignment.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#HOUR1_FIELD">HOUR1_FIELD</a></strong></code>
<div class="block">Useful constant for one-based HOUR field alignment.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#LONG">LONG</a></strong></code>
<div class="block">Constant for long style pattern.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#MEDIUM">MEDIUM</a></strong></code>
<div class="block">Constant for medium style pattern.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#MILLISECOND_FIELD">MILLISECOND_FIELD</a></strong></code>
<div class="block">Useful constant for MILLISECOND field alignment.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#MINUTE_FIELD">MINUTE_FIELD</a></strong></code>
<div class="block">Useful constant for MINUTE field alignment.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#MONTH_FIELD">MONTH_FIELD</a></strong></code>
<div class="block">Useful constant for MONTH field alignment.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../java/text/NumberFormat.html" title="class in java.text">NumberFormat</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#numberFormat">numberFormat</a></strong></code>
<div class="block">The number formatter that <code>DateFormat</code> uses to format numbers
in dates and times.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#SECOND_FIELD">SECOND_FIELD</a></strong></code>
<div class="block">Useful constant for SECOND field alignment.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#SHORT">SHORT</a></strong></code>
<div class="block">Constant for short style pattern.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#TIMEZONE_FIELD">TIMEZONE_FIELD</a></strong></code>
<div class="block">Useful constant for TIMEZONE field alignment.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#WEEK_OF_MONTH_FIELD">WEEK_OF_MONTH_FIELD</a></strong></code>
<div class="block">Useful constant for WEEK_OF_MONTH field alignment.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#WEEK_OF_YEAR_FIELD">WEEK_OF_YEAR_FIELD</a></strong></code>
<div class="block">Useful constant for WEEK_OF_YEAR field alignment.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#YEAR_FIELD">YEAR_FIELD</a></strong></code>
<div class="block">Useful constant for YEAR field alignment.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colLast" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#DateFormat()">DateFormat</a></strong>()</code>
<div class="block">Create a new date format.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../java/lang/Object.html" title="class in java.lang">Object</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#clone()">clone</a></strong>()</code>
<div class="block">Overrides Cloneable</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#equals(java.lang.Object)">equals</a></strong>(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a> obj)</code>
<div class="block">Overrides equals</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../java/lang/String.html" title="class in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#format(java.util.Date)">format</a></strong>(<a href="../../java/util/Date.html" title="class in java.util">Date</a> date)</code>
<div class="block">Formats a Date into a date/time string.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>abstract <a href="../../java/lang/StringBuffer.html" title="class in java.lang">StringBuffer</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#format(java.util.Date,%20java.lang.StringBuffer,%20java.text.FieldPosition)">format</a></strong>(<a href="../../java/util/Date.html" title="class in java.util">Date</a> date,
<a href="../../java/lang/StringBuffer.html" title="class in java.lang">StringBuffer</a> toAppendTo,
<a href="../../java/text/FieldPosition.html" title="class in java.text">FieldPosition</a> fieldPosition)</code>
<div class="block">Formats a Date into a date/time string.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../java/lang/StringBuffer.html" title="class in java.lang">StringBuffer</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#format(java.lang.Object,%20java.lang.StringBuffer,%20java.text.FieldPosition)">format</a></strong>(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a> obj,
<a href="../../java/lang/StringBuffer.html" title="class in java.lang">StringBuffer</a> toAppendTo,
<a href="../../java/text/FieldPosition.html" title="class in java.text">FieldPosition</a> fieldPosition)</code>
<div class="block">Overrides Format.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../java/util/Locale.html" title="class in java.util">Locale</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#getAvailableLocales()">getAvailableLocales</a></strong>()</code>
<div class="block">Returns an array of all locales for which the
<code>get*Instance</code> methods of this class can return
localized instances.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../java/util/Calendar.html" title="class in java.util">Calendar</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#getCalendar()">getCalendar</a></strong>()</code>
<div class="block">Gets the calendar associated with this date/time formatter.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.html" title="class in java.text">DateFormat</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#getDateInstance()">getDateInstance</a></strong>()</code>
<div class="block">Gets the date formatter with the default formatting style
for the default locale.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.html" title="class in java.text">DateFormat</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#getDateInstance(int)">getDateInstance</a></strong>(int style)</code>
<div class="block">Gets the date formatter with the given formatting style
for the default locale.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.html" title="class in java.text">DateFormat</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#getDateInstance(int,%20java.util.Locale)">getDateInstance</a></strong>(int style,
<a href="../../java/util/Locale.html" title="class in java.util">Locale</a> aLocale)</code>
<div class="block">Gets the date formatter with the given formatting style
for the given locale.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.html" title="class in java.text">DateFormat</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#getDateTimeInstance()">getDateTimeInstance</a></strong>()</code>
<div class="block">Gets the date/time formatter with the default formatting style
for the default locale.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.html" title="class in java.text">DateFormat</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#getDateTimeInstance(int,%20int)">getDateTimeInstance</a></strong>(int dateStyle,
int timeStyle)</code>
<div class="block">Gets the date/time formatter with the given date and time
formatting styles for the default locale.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.html" title="class in java.text">DateFormat</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#getDateTimeInstance(int,%20int,%20java.util.Locale)">getDateTimeInstance</a></strong>(int dateStyle,
int timeStyle,
<a href="../../java/util/Locale.html" title="class in java.util">Locale</a> aLocale)</code>
<div class="block">Gets the date/time formatter with the given formatting styles
for the given locale.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.html" title="class in java.text">DateFormat</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#getInstance()">getInstance</a></strong>()</code>
<div class="block">Get a default date/time formatter that uses the SHORT style for both the
date and the time.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../java/text/NumberFormat.html" title="class in java.text">NumberFormat</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#getNumberFormat()">getNumberFormat</a></strong>()</code>
<div class="block">Gets the number formatter which this date/time formatter uses to
format and parse a time.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.html" title="class in java.text">DateFormat</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#getTimeInstance()">getTimeInstance</a></strong>()</code>
<div class="block">Gets the time formatter with the default formatting style
for the default locale.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.html" title="class in java.text">DateFormat</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#getTimeInstance(int)">getTimeInstance</a></strong>(int style)</code>
<div class="block">Gets the time formatter with the given formatting style
for the default locale.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.html" title="class in java.text">DateFormat</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#getTimeInstance(int,%20java.util.Locale)">getTimeInstance</a></strong>(int style,
<a href="../../java/util/Locale.html" title="class in java.util">Locale</a> aLocale)</code>
<div class="block">Gets the time formatter with the given formatting style
for the given locale.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../java/util/TimeZone.html" title="class in java.util">TimeZone</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#getTimeZone()">getTimeZone</a></strong>()</code>
<div class="block">Gets the time zone.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#hashCode()">hashCode</a></strong>()</code>
<div class="block">Overrides hashCode</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#isLenient()">isLenient</a></strong>()</code>
<div class="block">Tell whether date/time parsing is to be lenient.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../java/util/Date.html" title="class in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#parse(java.lang.String)">parse</a></strong>(<a href="../../java/lang/String.html" title="class in java.lang">String</a> source)</code>
<div class="block">Parses text from the beginning of the given string to produce a date.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>abstract <a href="../../java/util/Date.html" title="class in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#parse(java.lang.String,%20java.text.ParsePosition)">parse</a></strong>(<a href="../../java/lang/String.html" title="class in java.lang">String</a> source,
<a href="../../java/text/ParsePosition.html" title="class in java.text">ParsePosition</a> pos)</code>
<div class="block">Parse a date/time string according to the given parse position.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../java/lang/Object.html" title="class in java.lang">Object</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#parseObject(java.lang.String,%20java.text.ParsePosition)">parseObject</a></strong>(<a href="../../java/lang/String.html" title="class in java.lang">String</a> source,
<a href="../../java/text/ParsePosition.html" title="class in java.text">ParsePosition</a> pos)</code>
<div class="block">Parses text from a string to produce a <code>Date</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#setCalendar(java.util.Calendar)">setCalendar</a></strong>(<a href="../../java/util/Calendar.html" title="class in java.util">Calendar</a> newCalendar)</code>
<div class="block">Set the calendar to be used by this date format.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#setLenient(boolean)">setLenient</a></strong>(boolean lenient)</code>
<div class="block">Specify whether or not date/time parsing is to be lenient.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#setNumberFormat(java.text.NumberFormat)">setNumberFormat</a></strong>(<a href="../../java/text/NumberFormat.html" title="class in java.text">NumberFormat</a> newNumberFormat)</code>
<div class="block">Allows you to set the number formatter.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.html#setTimeZone(java.util.TimeZone)">setTimeZone</a></strong>(<a href="../../java/util/TimeZone.html" title="class in java.util">TimeZone</a> zone)</code>
<div class="block">Sets the time zone for the calendar of this <code>DateFormat</code> object.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.text.Format">
<!-- -->
</a>
<h3>Methods inherited from class java.text.<a href="../../java/text/Format.html" title="class in java.text">Format</a></h3>
<code><a href="../../java/text/Format.html#format(java.lang.Object)">format</a>, <a href="../../java/text/Format.html#formatToCharacterIterator(java.lang.Object)">formatToCharacterIterator</a>, <a href="../../java/text/Format.html#parseObject(java.lang.String)">parseObject</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.<a href="../../java/lang/Object.html" title="class in java.lang">Object</a></h3>
<code><a href="../../java/lang/Object.html#finalize()">finalize</a>, <a href="../../java/lang/Object.html#getClass()">getClass</a>, <a href="../../java/lang/Object.html#notify()">notify</a>, <a href="../../java/lang/Object.html#notifyAll()">notifyAll</a>, <a href="../../java/lang/Object.html#toString()">toString</a>, <a href="../../java/lang/Object.html#wait()">wait</a>, <a href="../../java/lang/Object.html#wait(long)">wait</a>, <a href="../../java/lang/Object.html#wait(long,%20int)">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="calendar">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>calendar</h4>
<pre>protected <a href="../../java/util/Calendar.html" title="class in java.util">Calendar</a> calendar</pre>
<div class="block">The <a href="../../java/util/Calendar.html" title="class in java.util"><code>Calendar</code></a> instance used for calculating the date-time fields
and the instant of time. This field is used for both formatting and
parsing.
<p>Subclasses should initialize this field to a <a href="../../java/util/Calendar.html" title="class in java.util"><code>Calendar</code></a>
appropriate for the <a href="../../java/util/Locale.html" title="class in java.util"><code>Locale</code></a> associated with this
<code>DateFormat</code>.</div>
</li>
</ul>
<a name="numberFormat">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>numberFormat</h4>
<pre>protected <a href="../../java/text/NumberFormat.html" title="class in java.text">NumberFormat</a> numberFormat</pre>
<div class="block">The number formatter that <code>DateFormat</code> uses to format numbers
in dates and times. Subclasses should initialize this to a number format
appropriate for the locale associated with this <code>DateFormat</code>.</div>
</li>
</ul>
<a name="ERA_FIELD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ERA_FIELD</h4>
<pre>public static final int ERA_FIELD</pre>
<div class="block">Useful constant for ERA field alignment.
Used in FieldPosition of date/time formatting.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.DateFormat.ERA_FIELD">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="YEAR_FIELD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>YEAR_FIELD</h4>
<pre>public static final int YEAR_FIELD</pre>
<div class="block">Useful constant for YEAR field alignment.
Used in FieldPosition of date/time formatting.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.DateFormat.YEAR_FIELD">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="MONTH_FIELD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MONTH_FIELD</h4>
<pre>public static final int MONTH_FIELD</pre>
<div class="block">Useful constant for MONTH field alignment.
Used in FieldPosition of date/time formatting.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.DateFormat.MONTH_FIELD">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DATE_FIELD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DATE_FIELD</h4>
<pre>public static final int DATE_FIELD</pre>
<div class="block">Useful constant for DATE field alignment.
Used in FieldPosition of date/time formatting.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.DateFormat.DATE_FIELD">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="HOUR_OF_DAY1_FIELD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HOUR_OF_DAY1_FIELD</h4>
<pre>public static final int HOUR_OF_DAY1_FIELD</pre>
<div class="block">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.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.DateFormat.HOUR_OF_DAY1_FIELD">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="HOUR_OF_DAY0_FIELD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HOUR_OF_DAY0_FIELD</h4>
<pre>public static final int HOUR_OF_DAY0_FIELD</pre>
<div class="block">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.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.DateFormat.HOUR_OF_DAY0_FIELD">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="MINUTE_FIELD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MINUTE_FIELD</h4>
<pre>public static final int MINUTE_FIELD</pre>
<div class="block">Useful constant for MINUTE field alignment.
Used in FieldPosition of date/time formatting.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.DateFormat.MINUTE_FIELD">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="SECOND_FIELD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SECOND_FIELD</h4>
<pre>public static final int SECOND_FIELD</pre>
<div class="block">Useful constant for SECOND field alignment.
Used in FieldPosition of date/time formatting.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.DateFormat.SECOND_FIELD">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="MILLISECOND_FIELD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MILLISECOND_FIELD</h4>
<pre>public static final int MILLISECOND_FIELD</pre>
<div class="block">Useful constant for MILLISECOND field alignment.
Used in FieldPosition of date/time formatting.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.DateFormat.MILLISECOND_FIELD">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DAY_OF_WEEK_FIELD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DAY_OF_WEEK_FIELD</h4>
<pre>public static final int DAY_OF_WEEK_FIELD</pre>
<div class="block">Useful constant for DAY_OF_WEEK field alignment.
Used in FieldPosition of date/time formatting.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.DateFormat.DAY_OF_WEEK_FIELD">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DAY_OF_YEAR_FIELD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DAY_OF_YEAR_FIELD</h4>
<pre>public static final int DAY_OF_YEAR_FIELD</pre>
<div class="block">Useful constant for DAY_OF_YEAR field alignment.
Used in FieldPosition of date/time formatting.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.DateFormat.DAY_OF_YEAR_FIELD">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DAY_OF_WEEK_IN_MONTH_FIELD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DAY_OF_WEEK_IN_MONTH_FIELD</h4>
<pre>public static final int DAY_OF_WEEK_IN_MONTH_FIELD</pre>
<div class="block">Useful constant for DAY_OF_WEEK_IN_MONTH field alignment.
Used in FieldPosition of date/time formatting.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.DateFormat.DAY_OF_WEEK_IN_MONTH_FIELD">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="WEEK_OF_YEAR_FIELD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>WEEK_OF_YEAR_FIELD</h4>
<pre>public static final int WEEK_OF_YEAR_FIELD</pre>
<div class="block">Useful constant for WEEK_OF_YEAR field alignment.
Used in FieldPosition of date/time formatting.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.DateFormat.WEEK_OF_YEAR_FIELD">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="WEEK_OF_MONTH_FIELD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>WEEK_OF_MONTH_FIELD</h4>
<pre>public static final int WEEK_OF_MONTH_FIELD</pre>
<div class="block">Useful constant for WEEK_OF_MONTH field alignment.
Used in FieldPosition of date/time formatting.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.DateFormat.WEEK_OF_MONTH_FIELD">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="AM_PM_FIELD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>AM_PM_FIELD</h4>
<pre>public static final int AM_PM_FIELD</pre>
<div class="block">Useful constant for AM_PM field alignment.
Used in FieldPosition of date/time formatting.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.DateFormat.AM_PM_FIELD">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="HOUR1_FIELD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HOUR1_FIELD</h4>
<pre>public static final int HOUR1_FIELD</pre>
<div class="block">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.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.DateFormat.HOUR1_FIELD">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="HOUR0_FIELD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HOUR0_FIELD</h4>
<pre>public static final int HOUR0_FIELD</pre>
<div class="block">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.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.DateFormat.HOUR0_FIELD">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="TIMEZONE_FIELD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TIMEZONE_FIELD</h4>
<pre>public static final int TIMEZONE_FIELD</pre>
<div class="block">Useful constant for TIMEZONE field alignment.
Used in FieldPosition of date/time formatting.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.DateFormat.TIMEZONE_FIELD">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="FULL">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FULL</h4>
<pre>public static final int FULL</pre>
<div class="block">Constant for full style pattern.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.DateFormat.FULL">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="LONG">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LONG</h4>
<pre>public static final int LONG</pre>
<div class="block">Constant for long style pattern.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.DateFormat.LONG">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="MEDIUM">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MEDIUM</h4>
<pre>public static final int MEDIUM</pre>
<div class="block">Constant for medium style pattern.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.DateFormat.MEDIUM">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="SHORT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SHORT</h4>
<pre>public static final int SHORT</pre>
<div class="block">Constant for short style pattern.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.DateFormat.SHORT">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DEFAULT">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT</h4>
<pre>public static final int DEFAULT</pre>
<div class="block">Constant for default style pattern. Its value is MEDIUM.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.DateFormat.DEFAULT">Constant Field Values</a></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="DateFormat()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DateFormat</h4>
<pre>protected DateFormat()</pre>
<div class="block">Create a new date format.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>format</h4>
<pre>public final <a href="../../java/lang/StringBuffer.html" title="class in java.lang">StringBuffer</a> format(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a> obj,
<a href="../../java/lang/StringBuffer.html" title="class in java.lang">StringBuffer</a> toAppendTo,
<a href="../../java/text/FieldPosition.html" title="class in java.text">FieldPosition</a> fieldPosition)</pre>
<div class="block">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.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../java/text/Format.html#format(java.lang.Object,%20java.lang.StringBuffer,%20java.text.FieldPosition)">format</a></code> in class <code><a href="../../java/text/Format.html" title="class in java.text">Format</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>obj</code> - must be a Number or a Date.</dd><dd><code>toAppendTo</code> - the string buffer for the returning time string.</dd><dd><code>fieldPosition</code> - keeps track of the position of the field
within the returned string.
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 fieldPosition is DateFormat.YEAR_FIELD, the
begin index and end index of fieldPosition will be set to
0 and 4, respectively.
Notice that if the same time field appears
more than once in a pattern, the fieldPosition will be set for the first
occurrence 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 begin index and end index of fieldPosition will be set to
5 and 8, respectively, for the first occurrence of the timezone
pattern character 'z'.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the string buffer passed in as toAppendTo, with formatted text appended.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../java/text/Format.html" title="class in java.text"><code>Format</code></a></dd></dl>
</li>
</ul>
<a name="format(java.util.Date, java.lang.StringBuffer, java.text.FieldPosition)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>format</h4>
<pre>public abstract <a href="../../java/lang/StringBuffer.html" title="class in java.lang">StringBuffer</a> format(<a href="../../java/util/Date.html" title="class in java.util">Date</a> date,
<a href="../../java/lang/StringBuffer.html" title="class in java.lang">StringBuffer</a> toAppendTo,
<a href="../../java/text/FieldPosition.html" title="class in java.text">FieldPosition</a> fieldPosition)</pre>
<div class="block">Formats a Date into a date/time string.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - a Date to be formatted into a date/time string.</dd><dd><code>toAppendTo</code> - the string buffer for the returning date/time string.</dd><dd><code>fieldPosition</code> - keeps track of the position of the field
within the returned string.
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 fieldPosition is DateFormat.YEAR_FIELD, the
begin index and end index of fieldPosition will be set to
0 and 4, respectively.
Notice that if the same time field appears
more than once in a pattern, the fieldPosition will be set for the first
occurrence 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 begin index and end index of fieldPosition will be set to
5 and 8, respectively, for the first occurrence of the timezone
pattern character 'z'.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the string buffer passed in as toAppendTo, with formatted text appended.</dd></dl>
</li>
</ul>
<a name="format(java.util.Date)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>format</h4>
<pre>public final <a href="../../java/lang/String.html" title="class in java.lang">String</a> format(<a href="../../java/util/Date.html" title="class in java.util">Date</a> date)</pre>
<div class="block">Formats a Date into a date/time string.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the time value to be formatted into a time string.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the formatted time string.</dd></dl>
</li>
</ul>
<a name="parse(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parse</h4>
<pre>public <a href="../../java/util/Date.html" title="class in java.util">Date</a> parse(<a href="../../java/lang/String.html" title="class in java.lang">String</a> source)
throws <a href="../../java/text/ParseException.html" title="class in java.text">ParseException</a></pre>
<div class="block">Parses text from the beginning of the given string to produce a date.
The method may not use the entire text of the given string.
<p>
See the <a href="../../java/text/DateFormat.html#parse(java.lang.String,%20java.text.ParsePosition)"><code>parse(String, ParsePosition)</code></a> method for more information
on date parsing.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>source</code> - A <code>String</code> whose beginning should be parsed.</dd>
<dt><span class="strong">Returns:</span></dt><dd>A <code>Date</code> parsed from the string.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../java/text/ParseException.html" title="class in java.text">ParseException</a></code> - if the beginning of the specified string
cannot be parsed.</dd></dl>
</li>
</ul>
<a name="parse(java.lang.String, java.text.ParsePosition)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parse</h4>
<pre>public abstract <a href="../../java/util/Date.html" title="class in java.util">Date</a> parse(<a href="../../java/lang/String.html" title="class in java.lang">String</a> source,
<a href="../../java/text/ParsePosition.html" title="class in java.text">ParsePosition</a> pos)</pre>
<div class="block">Parse a date/time string according to the given parse position. For
example, a time text <code>"07/10/96 4:5 PM, PDT"</code> will be parsed into a <code>Date</code>
that is equivalent to <code>Date(837039900000L)</code>.
<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 <a href="../../java/text/DateFormat.html#setLenient(boolean)"><code>setLenient(false)</code></a>.
<p>This parsing operation uses the <a href="../../java/text/DateFormat.html#calendar"><code>calendar</code></a> to produce
a <code>Date</code>. As a result, the <code>calendar</code>'s date-time
fields and the <code>TimeZone</code> value may have been
overwritten, depending on subclass implementations. Any <code>TimeZone</code> value that has previously been set by a call to
<a href="../../java/text/DateFormat.html#setTimeZone(java.util.TimeZone)"><code>setTimeZone</code></a> may need
to be restored for further operations.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>source</code> - The date/time string to be parsed</dd><dd><code>pos</code> - 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.</dd>
<dt><span class="strong">Returns:</span></dt><dd>A <code>Date</code>, or <code>null</code> if the input could not be parsed</dd></dl>
</li>
</ul>
<a name="parseObject(java.lang.String, java.text.ParsePosition)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseObject</h4>
<pre>public <a href="../../java/lang/Object.html" title="class in java.lang">Object</a> parseObject(<a href="../../java/lang/String.html" title="class in java.lang">String</a> source,
<a href="../../java/text/ParsePosition.html" title="class in java.text">ParsePosition</a> pos)</pre>
<div class="block">Parses text from a string to produce a <code>Date</code>.
<p>
The method attempts to parse text starting at the index given by
<code>pos</code>.
If parsing succeeds, then the index of <code>pos</code> is updated
to the index after the last character used (parsing does not necessarily
use all characters up to the end of the string), and the parsed
date is returned. The updated <code>pos</code> can be used to
indicate the starting point for the next call to this method.
If an error occurs, then the index of <code>pos</code> is not
changed, the error index of <code>pos</code> is set to the index of
the character where the error occurred, and null is returned.
<p>
See the <a href="../../java/text/DateFormat.html#parse(java.lang.String,%20java.text.ParsePosition)"><code>parse(String, ParsePosition)</code></a> method for more information
on date parsing.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../java/text/Format.html#parseObject(java.lang.String,%20java.text.ParsePosition)">parseObject</a></code> in class <code><a href="../../java/text/Format.html" title="class in java.text">Format</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>source</code> - A <code>String</code>, part of which should be parsed.</dd><dd><code>pos</code> - A <code>ParsePosition</code> object with index and error
index information as described above.</dd>
<dt><span class="strong">Returns:</span></dt><dd>A <code>Date</code> parsed from the string. In case of
error, returns null.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if <code>pos</code> is null.</dd></dl>
</li>
</ul>
<a name="getTimeInstance()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTimeInstance</h4>
<pre>public static final <a href="../../java/text/DateFormat.html" title="class in java.text">DateFormat</a> getTimeInstance()</pre>
<div class="block">Gets the time formatter with the default formatting style
for the default locale.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>a time formatter.</dd></dl>
</li>
</ul>
<a name="getTimeInstance(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTimeInstance</h4>
<pre>public static final <a href="../../java/text/DateFormat.html" title="class in java.text">DateFormat</a> getTimeInstance(int style)</pre>
<div class="block">Gets the time formatter with the given formatting style
for the default locale.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>style</code> - the given formatting style. For example,
SHORT for "h:mm a" in the US locale.</dd>
<dt><span class="strong">Returns:</span></dt><dd>a time formatter.</dd></dl>
</li>
</ul>
<a name="getTimeInstance(int, java.util.Locale)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTimeInstance</h4>
<pre>public static final <a href="../../java/text/DateFormat.html" title="class in java.text">DateFormat</a> getTimeInstance(int style,
<a href="../../java/util/Locale.html" title="class in java.util">Locale</a> aLocale)</pre>
<div class="block">Gets the time formatter with the given formatting style
for the given locale.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>style</code> - the given formatting style. For example,
SHORT for "h:mm a" in the US locale.</dd><dd><code>aLocale</code> - the given locale.</dd>
<dt><span class="strong">Returns:</span></dt><dd>a time formatter.</dd></dl>
</li>
</ul>
<a name="getDateInstance()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDateInstance</h4>
<pre>public static final <a href="../../java/text/DateFormat.html" title="class in java.text">DateFormat</a> getDateInstance()</pre>
<div class="block">Gets the date formatter with the default formatting style
for the default locale.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>a date formatter.</dd></dl>
</li>
</ul>
<a name="getDateInstance(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDateInstance</h4>
<pre>public static final <a href="../../java/text/DateFormat.html" title="class in java.text">DateFormat</a> getDateInstance(int style)</pre>
<div class="block">Gets the date formatter with the given formatting style
for the default locale.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>style</code> - the given formatting style. For example,
SHORT for "M/d/yy" in the US locale.</dd>
<dt><span class="strong">Returns:</span></dt><dd>a date formatter.</dd></dl>
</li>
</ul>
<a name="getDateInstance(int, java.util.Locale)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDateInstance</h4>
<pre>public static final <a href="../../java/text/DateFormat.html" title="class in java.text">DateFormat</a> getDateInstance(int style,
<a href="../../java/util/Locale.html" title="class in java.util">Locale</a> aLocale)</pre>
<div class="block">Gets the date formatter with the given formatting style
for the given locale.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>style</code> - the given formatting style. For example,
SHORT for "M/d/yy" in the US locale.</dd><dd><code>aLocale</code> - the given locale.</dd>
<dt><span class="strong">Returns:</span></dt><dd>a date formatter.</dd></dl>
</li>
</ul>
<a name="getDateTimeInstance()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDateTimeInstance</h4>
<pre>public static final <a href="../../java/text/DateFormat.html" title="class in java.text">DateFormat</a> getDateTimeInstance()</pre>
<div class="block">Gets the date/time formatter with the default formatting style
for the default locale.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>a date/time formatter.</dd></dl>
</li>
</ul>
<a name="getDateTimeInstance(int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDateTimeInstance</h4>
<pre>public static final <a href="../../java/text/DateFormat.html" title="class in java.text">DateFormat</a> getDateTimeInstance(int dateStyle,
int timeStyle)</pre>
<div class="block">Gets the date/time formatter with the given date and time
formatting styles for the default locale.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dateStyle</code> - the given date formatting style. For example,
SHORT for "M/d/yy" in the US locale.</dd><dd><code>timeStyle</code> - the given time formatting style. For example,
SHORT for "h:mm a" in the US locale.</dd>
<dt><span class="strong">Returns:</span></dt><dd>a date/time formatter.</dd></dl>
</li>
</ul>
<a name="getDateTimeInstance(int, int, java.util.Locale)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDateTimeInstance</h4>
<pre>public static final <a href="../../java/text/DateFormat.html" title="class in java.text">DateFormat</a> getDateTimeInstance(int dateStyle,
int timeStyle,
<a href="../../java/util/Locale.html" title="class in java.util">Locale</a> aLocale)</pre>
<div class="block">Gets the date/time formatter with the given formatting styles
for the given locale.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dateStyle</code> - the given date formatting style.</dd><dd><code>timeStyle</code> - the given time formatting style.</dd><dd><code>aLocale</code> - the given locale.</dd>
<dt><span class="strong">Returns:</span></dt><dd>a date/time formatter.</dd></dl>
</li>
</ul>
<a name="getInstance()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInstance</h4>
<pre>public static final <a href="../../java/text/DateFormat.html" title="class in java.text">DateFormat</a> getInstance()</pre>
<div class="block">Get a default date/time formatter that uses the SHORT style for both the
date and the time.</div>
</li>
</ul>
<a name="getAvailableLocales()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAvailableLocales</h4>
<pre>public static <a href="../../java/util/Locale.html" title="class in java.util">Locale</a>[] getAvailableLocales()</pre>
<div class="block">Returns an array of all locales for which the
<code>get*Instance</code> methods of this class can return
localized instances.
The returned array represents the union of locales supported by the Java
runtime and by installed
<a href="../../java/text/spi/DateFormatProvider.html" title="class in java.text.spi"><code>DateFormatProvider</code></a> implementations.
It must contain at least a <code>Locale</code> instance equal to
<a href="../../java/util/Locale.html#US"><code>Locale.US</code></a>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>An array of locales for which localized
<code>DateFormat</code> instances are available.</dd></dl>
</li>
</ul>
<a name="setCalendar(java.util.Calendar)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCalendar</h4>
<pre>public void setCalendar(<a href="../../java/util/Calendar.html" title="class in java.util">Calendar</a> newCalendar)</pre>
<div class="block">Set the calendar to be used by this date format. Initially, the default
calendar for the specified or default locale is used.
<p>Any <a href="../../java/util/TimeZone.html" title="class in java.util"><code>TimeZone</code></a> and <a href="../../java/text/DateFormat.html#isLenient()">leniency</a> values that have previously been set are
overwritten by <code>newCalendar</code>'s values.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>newCalendar</code> - the new <code>Calendar</code> to be used by the date format</dd></dl>
</li>
</ul>
<a name="getCalendar()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCalendar</h4>
<pre>public <a href="../../java/util/Calendar.html" title="class in java.util">Calendar</a> getCalendar()</pre>
<div class="block">Gets the calendar associated with this date/time formatter.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the calendar associated with this date/time formatter.</dd></dl>
</li>
</ul>
<a name="setNumberFormat(java.text.NumberFormat)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setNumberFormat</h4>
<pre>public void setNumberFormat(<a href="../../java/text/NumberFormat.html" title="class in java.text">NumberFormat</a> newNumberFormat)</pre>
<div class="block">Allows you to set the number formatter.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>newNumberFormat</code> - the given new NumberFormat.</dd></dl>
</li>
</ul>
<a name="getNumberFormat()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNumberFormat</h4>
<pre>public <a href="../../java/text/NumberFormat.html" title="class in java.text">NumberFormat</a> getNumberFormat()</pre>
<div class="block">Gets the number formatter which this date/time formatter uses to
format and parse a time.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the number formatter which this date/time formatter uses.</dd></dl>
</li>
</ul>
<a name="setTimeZone(java.util.TimeZone)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setTimeZone</h4>
<pre>public void setTimeZone(<a href="../../java/util/TimeZone.html" title="class in java.util">TimeZone</a> zone)</pre>
<div class="block">Sets the time zone for the calendar of this <code>DateFormat</code> object.
This method is equivalent to the following call.
<blockquote><pre>
getCalendar().setTimeZone(zone)
</pre></blockquote>
<p>The <code>TimeZone</code> set by this method is overwritten by a
<a href="../../java/text/DateFormat.html#setCalendar(java.util.Calendar)"><code>setCalendar</code></a> call.
<p>The <code>TimeZone</code> set by this method may be overwritten as
a result of a call to the parse method.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>zone</code> - the given new time zone.</dd></dl>
</li>
</ul>
<a name="getTimeZone()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTimeZone</h4>
<pre>public <a href="../../java/util/TimeZone.html" title="class in java.util">TimeZone</a> getTimeZone()</pre>
<div class="block">Gets the time zone.
This method is equivalent to the following call.
<blockquote><pre>
getCalendar().getTimeZone()
</pre></blockquote></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the time zone associated with the calendar of DateFormat.</dd></dl>
</li>
</ul>
<a name="setLenient(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLenient</h4>
<pre>public void setLenient(boolean lenient)</pre>
<div class="block">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>This method is equivalent to the following call.
<blockquote><pre>
getCalendar().setLenient(lenient)
</pre></blockquote>
<p>This leniency value is overwritten by a call to <a href="../../java/text/DateFormat.html#setCalendar(java.util.Calendar)"><code>setCalendar()</code></a>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>lenient</code> - when <code>true</code>, parsing is lenient</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../java/util/Calendar.html#setLenient(boolean)"><code>Calendar.setLenient(boolean)</code></a></dd></dl>
</li>
</ul>
<a name="isLenient()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isLenient</h4>
<pre>public boolean isLenient()</pre>
<div class="block">Tell whether date/time parsing is to be lenient.
This method is equivalent to the following call.
<blockquote><pre>
getCalendar().isLenient()
</pre></blockquote></div>
<dl><dt><span class="strong">Returns:</span></dt><dd><code>true</code> if the <a href="../../java/text/DateFormat.html#calendar"><code>calendar</code></a> is lenient;
<code>false</code> otherwise.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../java/util/Calendar.html#isLenient()"><code>Calendar.isLenient()</code></a></dd></dl>
</li>
</ul>
<a name="hashCode()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public int hashCode()</pre>
<div class="block">Overrides hashCode</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../java/lang/Object.html#hashCode()">hashCode</a></code> in class <code><a href="../../java/lang/Object.html" title="class in java.lang">Object</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>a hash code value for this object.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../java/lang/Object.html#equals(java.lang.Object)"><code>Object.equals(java.lang.Object)</code></a>,
<a href="../../java/lang/System.html#identityHashCode(java.lang.Object)"><code>System.identityHashCode(java.lang.Object)</code></a></dd></dl>
</li>
</ul>
<a name="equals(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public boolean equals(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a> obj)</pre>
<div class="block">Overrides equals</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../java/lang/Object.html#equals(java.lang.Object)">equals</a></code> in class <code><a href="../../java/lang/Object.html" title="class in java.lang">Object</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>obj</code> - the reference object with which to compare.</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if this object is the same as the obj
argument; <code>false</code> otherwise.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../java/lang/Object.html#hashCode()"><code>Object.hashCode()</code></a>,
<a href="../../java/util/HashMap.html" title="class in java.util"><code>HashMap</code></a></dd></dl>
</li>
</ul>
<a name="clone()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>clone</h4>
<pre>public <a href="../../java/lang/Object.html" title="class in java.lang">Object</a> clone()</pre>
<div class="block">Overrides Cloneable</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../java/text/Format.html#clone()">clone</a></code> in class <code><a href="../../java/text/Format.html" title="class in java.text">Format</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>a clone of this instance.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../java/lang/Cloneable.html" title="interface in java.lang"><code>Cloneable</code></a></dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DateFormat.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-files/index-1.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><strong>Java™ Platform<br>Standard Ed. 7</strong></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../java/text/Collator.html" title="class in java.text"><span class="strong">Prev Class</span></a></li>
<li><a href="../../java/text/DateFormat.Field.html" title="class in java.text"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?java/text/DateFormat.html" target="_top">Frames</a></li>
<li><a href="DateFormat.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li><a href="#nested_class_summary">Nested</a> | </li>
<li><a href="#field_summary">Field</a> | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field_detail">Field</a> | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><font size="-1"> <a href="http://bugreport.sun.com/bugreport/">Submit a bug or feature</a> <br>For further API reference and developer documentation, see <a href="http://docs.oracle.com/javase/7/docs/index.html" target="_blank">Java SE Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.<br> <a href="../../../legal/cpyr.html">Copyright</a> © 1993, 2014, Oracle and/or its affiliates. All rights reserved. </font></small></p>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。