Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-release > by-pkgid > 3a4e91bde08970529a0aa07935652fe8 > files > 89

icu-doc-58.2-3.mga6.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ICU 58.2: icu::DateIntervalFormat Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ICU 58.2
   &#160;<span id="projectnumber">58.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceicu.html">icu</a></li><li class="navelem"><a class="el" href="classicu_1_1DateIntervalFormat.html">DateIntervalFormat</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">icu::DateIntervalFormat Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="classicu_1_1DateIntervalFormat.html" title="DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent man...">DateIntervalFormat</a> is a class for formatting and parsing date intervals in a language-independent manner.  
 <a href="classicu_1_1DateIntervalFormat.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="dtitvfmt_8h_source.html">dtitvfmt.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for icu::DateIntervalFormat:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classicu_1_1DateIntervalFormat.png" usemap="#icu::DateIntervalFormat_map" alt=""/>
  <map id="icu::DateIntervalFormat_map" name="icu::DateIntervalFormat_map">
<area href="classicu_1_1Format.html" title="Base class for all formats. " alt="icu::Format" shape="rect" coords="0,112,142,136"/>
<area href="classicu_1_1UObject.html" title="UObject is the common ICU &quot;boilerplate&quot; class. " alt="icu::UObject" shape="rect" coords="0,56,142,80"/>
<area href="classicu_1_1UMemory.html" title="UMemory is the common ICU base class. " alt="icu::UMemory" shape="rect" coords="0,0,142,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a368d6b65d027aeb8d9ede0093e54925e"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1DateIntervalFormat.html#a368d6b65d027aeb8d9ede0093e54925e">~DateIntervalFormat</a> ()</td></tr>
<tr class="memdesc:a368d6b65d027aeb8d9ede0093e54925e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#a368d6b65d027aeb8d9ede0093e54925e">More...</a><br /></td></tr>
<tr class="separator:a368d6b65d027aeb8d9ede0093e54925e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7bae778642a3f39981953089e25a4d2"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classicu_1_1Format.html">Format</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1DateIntervalFormat.html#ad7bae778642a3f39981953089e25a4d2">clone</a> (void) const </td></tr>
<tr class="memdesc:ad7bae778642a3f39981953089e25a4d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clone this <a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> object polymorphically.  <a href="#ad7bae778642a3f39981953089e25a4d2">More...</a><br /></td></tr>
<tr class="separator:ad7bae778642a3f39981953089e25a4d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa035d3ea07ce9bcb6c4802147826f7bb"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1DateIntervalFormat.html#aa035d3ea07ce9bcb6c4802147826f7bb">operator==</a> (const <a class="el" href="classicu_1_1Format.html">Format</a> &amp;other) const </td></tr>
<tr class="memdesc:aa035d3ea07ce9bcb6c4802147826f7bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return true if the given <a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> objects are semantically equal.  <a href="#aa035d3ea07ce9bcb6c4802147826f7bb">More...</a><br /></td></tr>
<tr class="separator:aa035d3ea07ce9bcb6c4802147826f7bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af143829f93e6595a3def64e04506714e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1DateIntervalFormat.html#af143829f93e6595a3def64e04506714e">operator!=</a> (const <a class="el" href="classicu_1_1Format.html">Format</a> &amp;other) const </td></tr>
<tr class="memdesc:af143829f93e6595a3def64e04506714e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return true if the given <a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> objects are not semantically equal.  <a href="#af143829f93e6595a3def64e04506714e">More...</a><br /></td></tr>
<tr class="separator:af143829f93e6595a3def64e04506714e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c03d0aa3227b576da283a3ca03e3477"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1DateIntervalFormat.html#a1c03d0aa3227b576da283a3ca03e3477">format</a> (const <a class="el" href="classicu_1_1Formattable.html">Formattable</a> &amp;obj, <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;appendTo, <a class="el" href="classicu_1_1FieldPosition.html">FieldPosition</a> &amp;fieldPosition, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr class="memdesc:a1c03d0aa3227b576da283a3ca03e3477"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> an object to produce a string.  <a href="#a1c03d0aa3227b576da283a3ca03e3477">More...</a><br /></td></tr>
<tr class="separator:a1c03d0aa3227b576da283a3ca03e3477"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f2d3fef670324706ca011ad02fff523"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1DateIntervalFormat.html#a4f2d3fef670324706ca011ad02fff523">format</a> (const <a class="el" href="classicu_1_1DateInterval.html">DateInterval</a> *dtInterval, <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;appendTo, <a class="el" href="classicu_1_1FieldPosition.html">FieldPosition</a> &amp;fieldPosition, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr class="memdesc:a4f2d3fef670324706ca011ad02fff523"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> a <a class="el" href="classicu_1_1DateInterval.html" title="This class represents a date interval. ">DateInterval</a> to produce a string.  <a href="#a4f2d3fef670324706ca011ad02fff523">More...</a><br /></td></tr>
<tr class="separator:a4f2d3fef670324706ca011ad02fff523"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a38eadbe1b85b22e2f6b588cda46e41aa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1DateIntervalFormat.html#a38eadbe1b85b22e2f6b588cda46e41aa">format</a> (<a class="el" href="classicu_1_1Calendar.html">Calendar</a> &amp;fromCalendar, <a class="el" href="classicu_1_1Calendar.html">Calendar</a> &amp;toCalendar, <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;appendTo, <a class="el" href="classicu_1_1FieldPosition.html">FieldPosition</a> &amp;fieldPosition, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr class="memdesc:a38eadbe1b85b22e2f6b588cda46e41aa"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> 2 Calendars to produce a string.  <a href="#a38eadbe1b85b22e2f6b588cda46e41aa">More...</a><br /></td></tr>
<tr class="separator:a38eadbe1b85b22e2f6b588cda46e41aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ee630aa393b4e1edfa97763579d051f"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1DateIntervalFormat.html#a2ee630aa393b4e1edfa97763579d051f">parseObject</a> (const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;source, <a class="el" href="classicu_1_1Formattable.html">Formattable</a> &amp;result, <a class="el" href="classicu_1_1ParsePosition.html">ParsePosition</a> &amp;parse_pos) const </td></tr>
<tr class="memdesc:a2ee630aa393b4e1edfa97763579d051f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Date interval parsing is not supported.  <a href="#a2ee630aa393b4e1edfa97763579d051f">More...</a><br /></td></tr>
<tr class="separator:a2ee630aa393b4e1edfa97763579d051f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba35ebb5fff2693e5ac46245141709fb"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classicu_1_1DateIntervalInfo.html">DateIntervalInfo</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1DateIntervalFormat.html#aba35ebb5fff2693e5ac46245141709fb">getDateIntervalInfo</a> (void) const </td></tr>
<tr class="memdesc:aba35ebb5fff2693e5ac46245141709fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the date time interval patterns.  <a href="#aba35ebb5fff2693e5ac46245141709fb">More...</a><br /></td></tr>
<tr class="separator:aba35ebb5fff2693e5ac46245141709fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa15e3dd8d0be0b0c8420dca92c79b63"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1DateIntervalFormat.html#afa15e3dd8d0be0b0c8420dca92c79b63">setDateIntervalInfo</a> (const <a class="el" href="classicu_1_1DateIntervalInfo.html">DateIntervalInfo</a> &amp;newIntervalPatterns, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr class="memdesc:afa15e3dd8d0be0b0c8420dca92c79b63"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the date time interval patterns.  <a href="#afa15e3dd8d0be0b0c8420dca92c79b63">More...</a><br /></td></tr>
<tr class="separator:afa15e3dd8d0be0b0c8420dca92c79b63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabe6a26dc030145ee945e8ccc76ba773"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classicu_1_1DateFormat.html">DateFormat</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1DateIntervalFormat.html#aabe6a26dc030145ee945e8ccc76ba773">getDateFormat</a> (void) const </td></tr>
<tr class="memdesc:aabe6a26dc030145ee945e8ccc76ba773"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the date formatter.  <a href="#aabe6a26dc030145ee945e8ccc76ba773">More...</a><br /></td></tr>
<tr class="separator:aabe6a26dc030145ee945e8ccc76ba773"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4870dad87dae6abe3229555145402d00"><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="classicu_1_1TimeZone.html">TimeZone</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1DateIntervalFormat.html#a4870dad87dae6abe3229555145402d00">getTimeZone</a> (void) const </td></tr>
<tr class="memdesc:a4870dad87dae6abe3229555145402d00"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a reference to the <a class="el" href="classicu_1_1TimeZone.html" title="TimeZone represents a time zone offset, and also figures out daylight savings. ">TimeZone</a> used by this <a class="el" href="classicu_1_1DateIntervalFormat.html" title="DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent man...">DateIntervalFormat</a>'s calendar.  <a href="#a4870dad87dae6abe3229555145402d00">More...</a><br /></td></tr>
<tr class="separator:a4870dad87dae6abe3229555145402d00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93ef0556833394c4a69c0c3ad1202d15"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1DateIntervalFormat.html#a93ef0556833394c4a69c0c3ad1202d15">adoptTimeZone</a> (<a class="el" href="classicu_1_1TimeZone.html">TimeZone</a> *zoneToAdopt)</td></tr>
<tr class="memdesc:a93ef0556833394c4a69c0c3ad1202d15"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the time zone for the calendar used by this <a class="el" href="classicu_1_1DateIntervalFormat.html" title="DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent man...">DateIntervalFormat</a> object.  <a href="#a93ef0556833394c4a69c0c3ad1202d15">More...</a><br /></td></tr>
<tr class="separator:a93ef0556833394c4a69c0c3ad1202d15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01ac0804b2cc1c1c111a3165ab75e48f"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1DateIntervalFormat.html#a01ac0804b2cc1c1c111a3165ab75e48f">setTimeZone</a> (const <a class="el" href="classicu_1_1TimeZone.html">TimeZone</a> &amp;zone)</td></tr>
<tr class="memdesc:a01ac0804b2cc1c1c111a3165ab75e48f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the time zone for the calendar used by this <a class="el" href="classicu_1_1DateIntervalFormat.html" title="DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent man...">DateIntervalFormat</a> object.  <a href="#a01ac0804b2cc1c1c111a3165ab75e48f">More...</a><br /></td></tr>
<tr class="separator:a01ac0804b2cc1c1c111a3165ab75e48f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83b346abbc3b9efa5a3481782537a5b1"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="uobject_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1DateIntervalFormat.html#a83b346abbc3b9efa5a3481782537a5b1">getDynamicClassID</a> (void) const </td></tr>
<tr class="memdesc:a83b346abbc3b9efa5a3481782537a5b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a unique class ID POLYMORPHICALLY.  <a href="#a83b346abbc3b9efa5a3481782537a5b1">More...</a><br /></td></tr>
<tr class="separator:a83b346abbc3b9efa5a3481782537a5b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classicu_1_1Format"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classicu_1_1Format')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classicu_1_1Format.html">icu::Format</a></td></tr>
<tr class="memitem:ab5b0d091d165c5576af62b3ee246058a inherit pub_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#ab5b0d091d165c5576af62b3ee246058a">~Format</a> ()</td></tr>
<tr class="memdesc:ab5b0d091d165c5576af62b3ee246058a inherit pub_methods_classicu_1_1Format"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#ab5b0d091d165c5576af62b3ee246058a">More...</a><br /></td></tr>
<tr class="separator:ab5b0d091d165c5576af62b3ee246058a inherit pub_methods_classicu_1_1Format"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6805569ed12cf68e0e8359dadcbe9b1c inherit pub_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a6805569ed12cf68e0e8359dadcbe9b1c">operator!=</a> (const <a class="el" href="classicu_1_1Format.html">Format</a> &amp;other) const </td></tr>
<tr class="memdesc:a6805569ed12cf68e0e8359dadcbe9b1c inherit pub_methods_classicu_1_1Format"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return true if the given <a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> objects are not semantically equal.  <a href="#a6805569ed12cf68e0e8359dadcbe9b1c">More...</a><br /></td></tr>
<tr class="separator:a6805569ed12cf68e0e8359dadcbe9b1c inherit pub_methods_classicu_1_1Format"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab510bded8f13465d98b950db03f15297 inherit pub_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#ab510bded8f13465d98b950db03f15297">format</a> (const <a class="el" href="classicu_1_1Formattable.html">Formattable</a> &amp;obj, <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;appendTo, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr class="memdesc:ab510bded8f13465d98b950db03f15297 inherit pub_methods_classicu_1_1Format"><td class="mdescLeft">&#160;</td><td class="mdescRight">Formats an object to produce a string.  <a href="#ab510bded8f13465d98b950db03f15297">More...</a><br /></td></tr>
<tr class="separator:ab510bded8f13465d98b950db03f15297 inherit pub_methods_classicu_1_1Format"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a24241eabda236878b4f93395ca5218 inherit pub_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a3a24241eabda236878b4f93395ca5218">format</a> (const <a class="el" href="classicu_1_1Formattable.html">Formattable</a> &amp;obj, <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;appendTo, <a class="el" href="classicu_1_1FieldPositionIterator.html">FieldPositionIterator</a> *posIter, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr class="memdesc:a3a24241eabda236878b4f93395ca5218 inherit pub_methods_classicu_1_1Format"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> an object to produce a string.  <a href="#a3a24241eabda236878b4f93395ca5218">More...</a><br /></td></tr>
<tr class="separator:a3a24241eabda236878b4f93395ca5218 inherit pub_methods_classicu_1_1Format"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a14835811eb14a1826b8529704de07bbf inherit pub_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a14835811eb14a1826b8529704de07bbf">parseObject</a> (const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;source, <a class="el" href="classicu_1_1Formattable.html">Formattable</a> &amp;result, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr class="memdesc:a14835811eb14a1826b8529704de07bbf inherit pub_methods_classicu_1_1Format"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parses a string to produce an object.  <a href="#a14835811eb14a1826b8529704de07bbf">More...</a><br /></td></tr>
<tr class="separator:a14835811eb14a1826b8529704de07bbf inherit pub_methods_classicu_1_1Format"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5064d4b46b3f5882fb339960089bf87e inherit pub_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1Locale.html">Locale</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a5064d4b46b3f5882fb339960089bf87e">getLocale</a> (<a class="el" href="uloc_8h.html#adf053345d343f8d82ae080f7a5871f34">ULocDataLocaleType</a> type, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr class="memdesc:a5064d4b46b3f5882fb339960089bf87e inherit pub_methods_classicu_1_1Format"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the locale for this format object.  <a href="#a5064d4b46b3f5882fb339960089bf87e">More...</a><br /></td></tr>
<tr class="separator:a5064d4b46b3f5882fb339960089bf87e inherit pub_methods_classicu_1_1Format"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b0f21f3e3f6cc3ed196af5e6559b421 inherit pub_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a1b0f21f3e3f6cc3ed196af5e6559b421">getLocaleID</a> (<a class="el" href="uloc_8h.html#adf053345d343f8d82ae080f7a5871f34">ULocDataLocaleType</a> type, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr class="memdesc:a1b0f21f3e3f6cc3ed196af5e6559b421 inherit pub_methods_classicu_1_1Format"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the locale for this format object.  <a href="#a1b0f21f3e3f6cc3ed196af5e6559b421">More...</a><br /></td></tr>
<tr class="separator:a1b0f21f3e3f6cc3ed196af5e6559b421 inherit pub_methods_classicu_1_1Format"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classicu_1_1UObject"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classicu_1_1UObject')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classicu_1_1UObject.html">icu::UObject</a></td></tr>
<tr class="memitem:af10026497704f510d3d1f2eff50acb18 inherit pub_methods_classicu_1_1UObject"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1UObject.html#af10026497704f510d3d1f2eff50acb18">~UObject</a> ()</td></tr>
<tr class="memdesc:af10026497704f510d3d1f2eff50acb18 inherit pub_methods_classicu_1_1UObject"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#af10026497704f510d3d1f2eff50acb18">More...</a><br /></td></tr>
<tr class="separator:af10026497704f510d3d1f2eff50acb18 inherit pub_methods_classicu_1_1UObject"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a84897fb6ea23efab339b1659985ad887"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classicu_1_1DateIntervalFormat.html">DateIntervalFormat</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1DateIntervalFormat.html#a84897fb6ea23efab339b1659985ad887">createInstance</a> (const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;skeleton, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr class="memdesc:a84897fb6ea23efab339b1659985ad887"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a <a class="el" href="classicu_1_1DateIntervalFormat.html" title="DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent man...">DateIntervalFormat</a> from skeleton and the default locale.  <a href="#a84897fb6ea23efab339b1659985ad887">More...</a><br /></td></tr>
<tr class="separator:a84897fb6ea23efab339b1659985ad887"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d81c40268e3e18187b0b8f7bac026d5"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classicu_1_1DateIntervalFormat.html">DateIntervalFormat</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1DateIntervalFormat.html#a1d81c40268e3e18187b0b8f7bac026d5">createInstance</a> (const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;skeleton, const <a class="el" href="classicu_1_1Locale.html">Locale</a> &amp;locale, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr class="memdesc:a1d81c40268e3e18187b0b8f7bac026d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a <a class="el" href="classicu_1_1DateIntervalFormat.html" title="DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent man...">DateIntervalFormat</a> from skeleton and a given locale.  <a href="#a1d81c40268e3e18187b0b8f7bac026d5">More...</a><br /></td></tr>
<tr class="separator:a1d81c40268e3e18187b0b8f7bac026d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad217fc705f3b6ac832dc8e3d68386021"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classicu_1_1DateIntervalFormat.html">DateIntervalFormat</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1DateIntervalFormat.html#ad217fc705f3b6ac832dc8e3d68386021">createInstance</a> (const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;skeleton, const <a class="el" href="classicu_1_1DateIntervalInfo.html">DateIntervalInfo</a> &amp;dtitvinf, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr class="memdesc:ad217fc705f3b6ac832dc8e3d68386021"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a <a class="el" href="classicu_1_1DateIntervalFormat.html" title="DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent man...">DateIntervalFormat</a> from skeleton <a class="el" href="classicu_1_1DateIntervalInfo.html" title="DateIntervalInfo is a public class for encapsulating localizable date time interval patterns...">DateIntervalInfo</a>, and default locale.  <a href="#ad217fc705f3b6ac832dc8e3d68386021">More...</a><br /></td></tr>
<tr class="separator:ad217fc705f3b6ac832dc8e3d68386021"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a684dc1d9f914fcd141da7ccf72b87b15"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classicu_1_1DateIntervalFormat.html">DateIntervalFormat</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1DateIntervalFormat.html#a684dc1d9f914fcd141da7ccf72b87b15">createInstance</a> (const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;skeleton, const <a class="el" href="classicu_1_1Locale.html">Locale</a> &amp;locale, const <a class="el" href="classicu_1_1DateIntervalInfo.html">DateIntervalInfo</a> &amp;dtitvinf, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr class="memdesc:a684dc1d9f914fcd141da7ccf72b87b15"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a <a class="el" href="classicu_1_1DateIntervalFormat.html" title="DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent man...">DateIntervalFormat</a> from skeleton a <a class="el" href="classicu_1_1DateIntervalInfo.html" title="DateIntervalInfo is a public class for encapsulating localizable date time interval patterns...">DateIntervalInfo</a>, and the given locale.  <a href="#a684dc1d9f914fcd141da7ccf72b87b15">More...</a><br /></td></tr>
<tr class="separator:a684dc1d9f914fcd141da7ccf72b87b15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9aea0188906097aeb2c8c2256a4d14a2"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="uobject_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1DateIntervalFormat.html#a9aea0188906097aeb2c8c2256a4d14a2">getStaticClassID</a> (void)</td></tr>
<tr class="memdesc:a9aea0188906097aeb2c8c2256a4d14a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the class ID for this class.  <a href="#a9aea0188906097aeb2c8c2256a4d14a2">More...</a><br /></td></tr>
<tr class="separator:a9aea0188906097aeb2c8c2256a4d14a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:ac7e02c89ac13b26e2059ca70f35e3d71"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1DateIntervalFormat.html#ac7e02c89ac13b26e2059ca70f35e3d71">DateIntervalFormat</a> (const <a class="el" href="classicu_1_1DateIntervalFormat.html">DateIntervalFormat</a> &amp;)</td></tr>
<tr class="memdesc:ac7e02c89ac13b26e2059ca70f35e3d71"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor.  <a href="#ac7e02c89ac13b26e2059ca70f35e3d71">More...</a><br /></td></tr>
<tr class="separator:ac7e02c89ac13b26e2059ca70f35e3d71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a989ee61d89f5f6363b0ef98c326daf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1DateIntervalFormat.html">DateIntervalFormat</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1DateIntervalFormat.html#a6a989ee61d89f5f6363b0ef98c326daf">operator=</a> (const <a class="el" href="classicu_1_1DateIntervalFormat.html">DateIntervalFormat</a> &amp;)</td></tr>
<tr class="memdesc:a6a989ee61d89f5f6363b0ef98c326daf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assignment operator.  <a href="#a6a989ee61d89f5f6363b0ef98c326daf">More...</a><br /></td></tr>
<tr class="separator:a6a989ee61d89f5f6363b0ef98c326daf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_methods_classicu_1_1Format"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classicu_1_1Format')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="classicu_1_1Format.html">icu::Format</a></td></tr>
<tr class="memitem:a9c316525df8bdb422d3e73f0eb9a2a32 inherit pro_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a9c316525df8bdb422d3e73f0eb9a2a32">setLocaleIDs</a> (const char *valid, const char *actual)</td></tr>
<tr class="separator:a9c316525df8bdb422d3e73f0eb9a2a32 inherit pro_methods_classicu_1_1Format"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e673e9e040598bace20c25a2261b845 inherit pro_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a0e673e9e040598bace20c25a2261b845">Format</a> ()</td></tr>
<tr class="memdesc:a0e673e9e040598bace20c25a2261b845 inherit pro_methods_classicu_1_1Format"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor for subclass use only.  <a href="#a0e673e9e040598bace20c25a2261b845">More...</a><br /></td></tr>
<tr class="separator:a0e673e9e040598bace20c25a2261b845 inherit pro_methods_classicu_1_1Format"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2747bab62f7164f3c1556c044502df6e inherit pro_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a2747bab62f7164f3c1556c044502df6e">Format</a> (const <a class="el" href="classicu_1_1Format.html">Format</a> &amp;)</td></tr>
<tr class="separator:a2747bab62f7164f3c1556c044502df6e inherit pro_methods_classicu_1_1Format"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e4a4f6e5eedfe8d949e9307191a3afc inherit pro_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1Format.html">Format</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a6e4a4f6e5eedfe8d949e9307191a3afc">operator=</a> (const <a class="el" href="classicu_1_1Format.html">Format</a> &amp;)</td></tr>
<tr class="separator:a6e4a4f6e5eedfe8d949e9307191a3afc inherit pro_methods_classicu_1_1Format"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_static_methods_classicu_1_1Format"><td colspan="2" onclick="javascript:toggleInherit('pro_static_methods_classicu_1_1Format')"><img src="closed.png" alt="-"/>&#160;Static Protected Member Functions inherited from <a class="el" href="classicu_1_1Format.html">icu::Format</a></td></tr>
<tr class="memitem:a4667230f833245c55ba081c163d8bb71 inherit pro_static_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a4667230f833245c55ba081c163d8bb71">syntaxError</a> (const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;pattern, int32_t pos, <a class="el" href="structUParseError.html">UParseError</a> &amp;parseError)</td></tr>
<tr class="memdesc:a4667230f833245c55ba081c163d8bb71 inherit pro_static_methods_classicu_1_1Format"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simple function for initializing a <a class="el" href="structUParseError.html" title="A UParseError struct is used to returned detailed information about parsing errors. ">UParseError</a> from a <a class="el" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a>.  <a href="#a4667230f833245c55ba081c163d8bb71">More...</a><br /></td></tr>
<tr class="separator:a4667230f833245c55ba081c163d8bb71 inherit pro_static_methods_classicu_1_1Format"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classicu_1_1DateIntervalFormat.html" title="DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent man...">DateIntervalFormat</a> is a class for formatting and parsing date intervals in a language-independent manner. </p>
<p>Only formatting is supported, parsing is not supported.</p>
<p>Date interval means from one date to another date, for example, from "Jan 11, 2008" to "Jan 18, 2008". We introduced class <a class="el" href="classicu_1_1DateInterval.html" title="This class represents a date interval. ">DateInterval</a> to represent it. <a class="el" href="classicu_1_1DateInterval.html" title="This class represents a date interval. ">DateInterval</a> is a pair of UDate, which is the standard milliseconds since 24:00 GMT, Jan 1, 1970.</p>
<p><a class="el" href="classicu_1_1DateIntervalFormat.html" title="DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent man...">DateIntervalFormat</a> formats a <a class="el" href="classicu_1_1DateInterval.html" title="This class represents a date interval. ">DateInterval</a> into text as compactly as possible. For example, the date interval format from "Jan 11, 2008" to "Jan 18,. 2008" is "Jan 11-18, 2008" for English. And it parses text into <a class="el" href="classicu_1_1DateInterval.html" title="This class represents a date interval. ">DateInterval</a>, although initially, parsing is not supported.</p>
<p>There is no structural information in date time patterns. For any punctuations and string literals inside a date time pattern, we do not know whether it is just a separator, or a prefix, or a suffix. Without such information, so, it is difficult to generate a sub-pattern (or super-pattern) by algorithm. So, formatting a <a class="el" href="classicu_1_1DateInterval.html" title="This class represents a date interval. ">DateInterval</a> is pattern-driven. It is very similar to formatting in <a class="el" href="classicu_1_1SimpleDateFormat.html" title="SimpleDateFormat is a concrete class for formatting and parsing dates in a language-independent manne...">SimpleDateFormat</a>. We introduce class <a class="el" href="classicu_1_1DateIntervalInfo.html" title="DateIntervalInfo is a public class for encapsulating localizable date time interval patterns...">DateIntervalInfo</a> to save date interval patterns, similar to date time pattern in <a class="el" href="classicu_1_1SimpleDateFormat.html" title="SimpleDateFormat is a concrete class for formatting and parsing dates in a language-independent manne...">SimpleDateFormat</a>.</p>
<p>Logically, the interval patterns are mappings from (skeleton, the_largest_different_calendar_field) to (date_interval_pattern).</p>
<p>A skeleton </p><ol>
<li>
only keeps the field pattern letter and ignores all other parts in a pattern, such as space, punctuations, and string literals.  </li>
<li>
hides the order of fields.  </li>
<li>
might hide a field's pattern letter length.  </li>
</ol>
<p>For those non-digit calendar fields, the pattern letter length is important, such as MMM, MMMM, and MMMMM; EEE and EEEE, and the field's pattern letter length is honored.</p>
<p>For the digit calendar fields, such as M or MM, d or dd, yy or yyyy, the field pattern length is ignored and the best match, which is defined in date time patterns, will be returned without honor the field pattern letter length in skeleton.</p>
<p>The calendar fields we support for interval formatting are: year, month, date, day-of-week, am-pm, hour, hour-of-day, minute, and second (though we do not currently have specific intervalFormat date for skeletons with seconds). Those calendar fields can be defined in the following order: year &gt; month &gt; date &gt; hour (in day) &gt; minute &gt; second</p>
<p>The largest different calendar fields between 2 calendars is the first different calendar field in above order.</p>
<p>For example: the largest different calendar fields between "Jan 10, 2007" and "Feb 20, 2008" is year.</p>
<p>For other calendar fields, the compact interval formatting is not supported. And the interval format will be fall back to fall-back patterns, which is mostly "{date0} - {date1}".</p>
<p>There is a set of pre-defined static skeleton strings. There are pre-defined interval patterns for those pre-defined skeletons in locales' resource files. For example, for a skeleton UDAT_YEAR_ABBR_MONTH_DAY, which is &quot;yMMMd&quot;, in en_US, if the largest different calendar field between date1 and date2 is &quot;year&quot;, the date interval pattern is &quot;MMM d, yyyy - MMM d, yyyy&quot;, such as &quot;Jan 10, 2007 - Jan 10, 2008&quot;. If the largest different calendar field between date1 and date2 is &quot;month&quot;, the date interval pattern is &quot;MMM d - MMM d, yyyy&quot;, such as &quot;Jan 10 - Feb 10, 2007&quot;. If the largest different calendar field between date1 and date2 is &quot;day&quot;, the date interval pattern is &quot;MMM d-d, yyyy&quot;, such as &quot;Jan 10-20, 2007&quot;.</p>
<p>For date skeleton, the interval patterns when year, or month, or date is different are defined in resource files. For time skeleton, the interval patterns when am/pm, or hour, or minute is different are defined in resource files.</p>
<p>If a skeleton is not found in a locale's <a class="el" href="classicu_1_1DateIntervalInfo.html" title="DateIntervalInfo is a public class for encapsulating localizable date time interval patterns...">DateIntervalInfo</a>, which means the interval patterns for the skeleton is not defined in resource file, the interval pattern will falls back to the interval "fallback" pattern defined in resource file. If the interval "fallback" pattern is not defined, the default fall-back is "{date0} - {data1}".</p>
<p>For the combination of date and time, The rule to generate interval patterns are: </p><ol>
<li>
when the year, month, or day differs, falls back to fall-back interval pattern, which mostly is the concatenate the two original expressions with a separator between, For example, interval pattern from "Jan 10, 2007 10:10 am" to "Jan 11, 2007 10:10am" is "Jan 10, 2007 10:10 am - Jan 11, 2007 10:10am"  </li>
<li>
otherwise, present the date followed by the range expression for the time. For example, interval pattern from "Jan 10, 2007 10:10 am" to "Jan 10, 2007 11:10am" is "Jan 10, 2007 10:10 am - 11:10am"  </li>
</ol>
<p>If two dates are the same, the interval pattern is the single date pattern. For example, interval pattern from "Jan 10, 2007" to "Jan 10, 2007" is "Jan 10, 2007".</p>
<p>Or if the presenting fields between 2 dates have the exact same values, the interval pattern is the single date pattern. For example, if user only requests year and month, the interval pattern from "Jan 10, 2007" to "Jan 20, 2007" is "Jan 2007".</p>
<p><a class="el" href="classicu_1_1DateIntervalFormat.html" title="DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent man...">DateIntervalFormat</a> needs the following information for correct formatting: time zone, calendar type, pattern, date format symbols, and date interval patterns. It can be instantiated in 2 ways: </p><ol>
<li>
create an instance using default or given locale plus given skeleton. Users are encouraged to created date interval formatter this way and to use the pre-defined skeleton macros, such as UDAT_YEAR_NUM_MONTH, which consists the calendar fields and the format style.  </li>
<li>
create an instance using default or given locale plus given skeleton plus a given <a class="el" href="classicu_1_1DateIntervalInfo.html" title="DateIntervalInfo is a public class for encapsulating localizable date time interval patterns...">DateIntervalInfo</a>. This factory method is for powerful users who want to provide their own interval patterns. <a class="el" href="classicu_1_1Locale.html" title="A Locale object represents a specific geographical, political, or cultural region. ">Locale</a> provides the timezone, calendar, and format symbols information. Local plus skeleton provides full pattern information. <a class="el" href="classicu_1_1DateIntervalInfo.html" title="DateIntervalInfo is a public class for encapsulating localizable date time interval patterns...">DateIntervalInfo</a> provides the date interval patterns.  </li>
</ol>
<p>For the calendar field pattern letter, such as G, y, M, d, a, h, H, m, s etc. <a class="el" href="classicu_1_1DateIntervalFormat.html" title="DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent man...">DateIntervalFormat</a> uses the same syntax as that of DateTime format.</p>
<p>Code Sample: general usage </p><pre>
<div class="fragment"><div class="line"><span class="comment">// the date interval object which the DateIntervalFormat formats on</span></div><div class="line"><span class="comment">// and parses into</span></div><div class="line">DateInterval*  dtInterval = <span class="keyword">new</span> DateInterval(1000*3600*24, 1000*3600*24*2);</div><div class="line"><a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> status = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9">U_ZERO_ERROR</a>;</div><div class="line"><a class="code" href="classicu_1_1DateIntervalFormat.html#ac7e02c89ac13b26e2059ca70f35e3d71">DateIntervalFormat</a>* dtIntervalFmt = <a class="code" href="classicu_1_1DateIntervalFormat.html#a84897fb6ea23efab339b1659985ad887">DateIntervalFormat::createInstance</a>(</div><div class="line">                        <a class="code" href="udat_8h.html#a8ed9ca005c11076b7bba60d01c22d80c">UDAT_YEAR_MONTH_DAY</a>,</div><div class="line">                        Locale(<span class="stringliteral">&quot;en&quot;</span>, <span class="stringliteral">&quot;GB&quot;</span>, <span class="stringliteral">&quot;&quot;</span>), status);</div><div class="line">UnicodeUnicodeString dateIntervalString;</div><div class="line">FieldPosition pos = 0;</div><div class="line"><span class="comment">// formatting</span></div><div class="line">dtIntervalFmt-&gt;format(dtInterval, dateIntervalUnicodeString, pos, status);</div><div class="line"><span class="keyword">delete</span> dtIntervalFmt;</div></div><!-- fragment -->
</pre> 
<p>Definition at line <a class="el" href="dtitvfmt_8h_source.html#l00222">222</a> of file <a class="el" href="dtitvfmt_8h_source.html">dtitvfmt.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a368d6b65d027aeb8d9ede0093e54925e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual icu::DateIntervalFormat::~DateIntervalFormat </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Destructor. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003492">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ac7e02c89ac13b26e2059ca70f35e3d71"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">icu::DateIntervalFormat::DateIntervalFormat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1DateIntervalFormat.html">DateIntervalFormat</a> &amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Copy constructor. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003507">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a93ef0556833394c4a69c0c3ad1202d15"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void icu::DateIntervalFormat::adoptTimeZone </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classicu_1_1TimeZone.html">TimeZone</a> *&#160;</td>
          <td class="paramname"><em>zoneToAdopt</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the time zone for the calendar used by this <a class="el" href="classicu_1_1DateIntervalFormat.html" title="DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent man...">DateIntervalFormat</a> object. </p>
<p>The caller no longer owns the <a class="el" href="classicu_1_1TimeZone.html" title="TimeZone represents a time zone offset, and also figures out daylight savings. ">TimeZone</a> object and should not delete it after this call. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">zoneToAdopt</td><td>the <a class="el" href="classicu_1_1TimeZone.html" title="TimeZone represents a time zone offset, and also figures out daylight savings. ">TimeZone</a> to be adopted. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003503">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl>

</div>
</div>
<a class="anchor" id="ad7bae778642a3f39981953089e25a4d2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classicu_1_1Format.html">Format</a>* icu::DateIntervalFormat::clone </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Clone this <a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> object polymorphically. </p>
<p>The caller owns the result and should delete it when done. </p><dl class="section return"><dt>Returns</dt><dd>A copy of the object. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003493">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

<p>Implements <a class="el" href="classicu_1_1Format.html#ad606fa4ed45908fe4220085c6276c65a">icu::Format</a>.</p>

</div>
</div>
<a class="anchor" id="a84897fb6ea23efab339b1659985ad887"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classicu_1_1DateIntervalFormat.html">DateIntervalFormat</a>* icu::DateIntervalFormat::createInstance </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;&#160;</td>
          <td class="paramname"><em>skeleton</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct a <a class="el" href="classicu_1_1DateIntervalFormat.html" title="DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent man...">DateIntervalFormat</a> from skeleton and the default locale. </p>
<p>This is a convenient override of createInstance(const <a class="el" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a>&amp; skeleton, const <a class="el" href="classicu_1_1Locale.html" title="A Locale object represents a specific geographical, political, or cultural region. ">Locale</a>&amp; locale, UErrorCode&amp;) with the value of locale as default locale.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">skeleton</td><td>the skeleton on which interval format based. </td></tr>
    <tr><td class="paramname">status</td><td>output param set to success/failure code on exit </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a date time interval formatter which the caller owns. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003488">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a1d81c40268e3e18187b0b8f7bac026d5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classicu_1_1DateIntervalFormat.html">DateIntervalFormat</a>* icu::DateIntervalFormat::createInstance </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;&#160;</td>
          <td class="paramname"><em>skeleton</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classicu_1_1Locale.html">Locale</a> &amp;&#160;</td>
          <td class="paramname"><em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct a <a class="el" href="classicu_1_1DateIntervalFormat.html" title="DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent man...">DateIntervalFormat</a> from skeleton and a given locale. </p>
<p>In this factory method, the date interval pattern information is load from resource files. Users are encouraged to created date interval formatter this way and to use the pre-defined skeleton macros.</p>
<p>There are pre-defined skeletons (defined in udate.h) having predefined interval patterns in resource files. Users are encouraged to use those macros. For example: DateIntervalFormat::createInstance(UDAT_MONTH_DAY, status)</p>
<p>The given <a class="el" href="classicu_1_1Locale.html" title="A Locale object represents a specific geographical, political, or cultural region. ">Locale</a> provides the interval patterns. For example, for en_GB, if skeleton is UDAT_YEAR_ABBR_MONTH_WEEKDAY_DAY, which is "yMMMEEEd", the interval patterns defined in resource file to above skeleton are: "EEE, d MMM, yyyy - EEE, d MMM, yyyy" for year differs, "EEE, d MMM - EEE, d MMM, yyyy" for month differs, "EEE, d - EEE, d MMM, yyyy" for day differs, </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">skeleton</td><td>the skeleton on which the interval format is based. </td></tr>
    <tr><td class="paramname">locale</td><td>the given locale </td></tr>
    <tr><td class="paramname">status</td><td>output param set to success/failure code on exit </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a date time interval formatter which the caller owns. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003489">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>
<h4>Sample code</h4>
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="dtitvfmt_8h.html">unicode/dtitvfmt.h</a>&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="ustdio_8h.html">unicode/ustdio.h</a>&quot;</span></div></div><!-- fragment --> <div class="fragment"><div class="line">        <a class="code" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *out = <a class="code" href="ustdio_8h.html#a97b3a4c3639271188f378bf87e2c957d">u_finit</a>(stdout, <a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <span class="stringliteral">&quot;UTF-8&quot;</span>);</div><div class="line">        <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> status =<a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9">U_ZERO_ERROR</a>;</div><div class="line">        <span class="comment">// create 3 Date Intervals</span></div><div class="line">        UnicodeString data[] = {</div><div class="line">                UnicodeString(<span class="stringliteral">&quot;2007-10-10 10:10:10&quot;</span>),</div><div class="line">                UnicodeString(<span class="stringliteral">&quot;2008-10-10 10:10:10&quot;</span>),</div><div class="line">                UnicodeString(<span class="stringliteral">&quot;2008-11-10 10:10:10&quot;</span>),</div><div class="line">                UnicodeString(<span class="stringliteral">&quot;2008-11-10 15:10:10&quot;</span>)</div><div class="line">                };</div><div class="line">        Calendar *cal = <a class="code" href="classicu_1_1Calendar.html#ad2d72d348ce478cf1715dd79b7262c89">Calendar::createInstance</a>(status);</div><div class="line">        cal-&gt;set(2007,10,10,10,10,10);</div><div class="line">        <a class="code" href="utypes_8h.html#ace1704e9e77d407d1eaaa2e73ec0c039">UDate</a> date1 = cal-&gt;getTime(status);</div><div class="line">        cal-&gt;set(2008,10,10,10,10,10);</div><div class="line">        <a class="code" href="utypes_8h.html#ace1704e9e77d407d1eaaa2e73ec0c039">UDate</a> date2 = cal-&gt;getTime(status);</div><div class="line">        cal-&gt;set(2008,11,10,10,10,10);</div><div class="line">        <a class="code" href="utypes_8h.html#ace1704e9e77d407d1eaaa2e73ec0c039">UDate</a> date3 = cal-&gt;getTime(status);</div><div class="line">        cal-&gt;set(2008,11,10,15,10,10);</div><div class="line">        <a class="code" href="utypes_8h.html#ace1704e9e77d407d1eaaa2e73ec0c039">UDate</a> date4 = cal-&gt;getTime(status);</div><div class="line">    DateInterval* dtitvsample[] = {</div><div class="line">                        <span class="keyword">new</span> DateInterval(date1,date2),</div><div class="line">            <span class="keyword">new</span> DateInterval(date2,date3),</div><div class="line">                        <span class="keyword">new</span> DateInterval(date3,date4),</div><div class="line">        };</div><div class="line">        UnicodeString skeletons[] = {</div><div class="line">            UnicodeString(<span class="stringliteral">&quot;yMMMd&quot;</span>),</div><div class="line">            UnicodeString(<span class="stringliteral">&quot;MMMMd&quot;</span>),</div><div class="line">            UnicodeString(<span class="stringliteral">&quot;jm&quot;</span>),</div><div class="line">                        0,</div><div class="line">                };</div><div class="line">    <a class="code" href="ustdio_8h.html#aace6d50c4e497147fa383f36619b6691">u_fprintf</a>(out,<span class="stringliteral">&quot;%-10s%-22s%-22s%-35s%-35s\n&quot;</span>, <span class="stringliteral">&quot;Skeleton&quot;</span>,<span class="stringliteral">&quot;from&quot;</span>,<span class="stringliteral">&quot;to&quot;</span>,<span class="stringliteral">&quot;Date Interval in en_US&quot;</span>,<span class="stringliteral">&quot;Date Interval in Ja&quot;</span>);</div><div class="line">        <span class="keywordtype">int</span> i=0;</div><div class="line">        UnicodeString formatEn,formatJa;</div><div class="line">        FieldPosition pos=0;</div><div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j=0;skeletons[j]!=<a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> ;j++) {</div><div class="line">                 <a class="code" href="ustdio_8h.html#aace6d50c4e497147fa383f36619b6691">u_fprintf</a>(out,<span class="stringliteral">&quot;%-10S%-22S%-22S&quot;</span>,skeletons[j].getTerminatedBuffer(),data[i].getTerminatedBuffer(),data[i+1].getTerminatedBuffer());</div><div class="line">         <span class="comment">//create a DateIntervalFormat instance for given skeleton, locale</span></div><div class="line">                 <a class="code" href="classicu_1_1DateIntervalFormat.html#ac7e02c89ac13b26e2059ca70f35e3d71">DateIntervalFormat</a>* dtitvfmtEn = <a class="code" href="classicu_1_1DateIntervalFormat.html#a84897fb6ea23efab339b1659985ad887">DateIntervalFormat::createInstance</a>(skeletons[j], <a class="code" href="classicu_1_1Locale.html#a9c0b495c3d3a8a7d77859bbbbebe0912">Locale::getEnglish</a>(),status);</div><div class="line">         <a class="code" href="classicu_1_1DateIntervalFormat.html#ac7e02c89ac13b26e2059ca70f35e3d71">DateIntervalFormat</a>* dtitvfmtJa = <a class="code" href="classicu_1_1DateIntervalFormat.html#a84897fb6ea23efab339b1659985ad887">DateIntervalFormat::createInstance</a>(skeletons[j], <a class="code" href="classicu_1_1Locale.html#a04c5829675a1839f1862bda410d58eba">Locale::getJapanese</a>(),status);</div><div class="line">                 formatEn.remove();</div><div class="line">                 formatJa.remove();</div><div class="line">                 <span class="comment">//get the DateIntervalFormat</span></div><div class="line">                 dtitvfmtEn-&gt;format(dtitvsample[i],formatEn,pos,status);</div><div class="line">                 dtitvfmtJa-&gt;format(dtitvsample[i],formatJa,pos,status);</div><div class="line">         <a class="code" href="ustdio_8h.html#aace6d50c4e497147fa383f36619b6691">u_fprintf</a>(out,<span class="stringliteral">&quot;%-35S%-35S\n&quot;</span>, formatEn.getTerminatedBuffer(),formatJa.getTerminatedBuffer());     </div><div class="line">                 <span class="keyword">delete</span> dtitvfmtEn;</div><div class="line">                 <span class="keyword">delete</span> dtitvfmtJa;</div><div class="line">         i++;</div><div class="line">        }</div><div class="line">        <a class="code" href="ustdio_8h.html#ab3241cbe6c98cc23a1a164b19d9f2d84">u_fclose</a>(out);</div></div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ad217fc705f3b6ac832dc8e3d68386021"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classicu_1_1DateIntervalFormat.html">DateIntervalFormat</a>* icu::DateIntervalFormat::createInstance </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;&#160;</td>
          <td class="paramname"><em>skeleton</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classicu_1_1DateIntervalInfo.html">DateIntervalInfo</a> &amp;&#160;</td>
          <td class="paramname"><em>dtitvinf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct a <a class="el" href="classicu_1_1DateIntervalFormat.html" title="DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent man...">DateIntervalFormat</a> from skeleton <a class="el" href="classicu_1_1DateIntervalInfo.html" title="DateIntervalInfo is a public class for encapsulating localizable date time interval patterns...">DateIntervalInfo</a>, and default locale. </p>
<p>This is a convenient override of createInstance(const <a class="el" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a>&amp; skeleton, const <a class="el" href="classicu_1_1Locale.html" title="A Locale object represents a specific geographical, political, or cultural region. ">Locale</a>&amp; locale, const <a class="el" href="classicu_1_1DateIntervalInfo.html" title="DateIntervalInfo is a public class for encapsulating localizable date time interval patterns...">DateIntervalInfo</a>&amp; dtitvinf, UErrorCode&amp;) with the locale value as default locale.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">skeleton</td><td>the skeleton on which interval format based. </td></tr>
    <tr><td class="paramname">dtitvinf</td><td>the <a class="el" href="classicu_1_1DateIntervalInfo.html" title="DateIntervalInfo is a public class for encapsulating localizable date time interval patterns...">DateIntervalInfo</a> object. </td></tr>
    <tr><td class="paramname">status</td><td>output param set to success/failure code on exit </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a date time interval formatter which the caller owns. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003490">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a684dc1d9f914fcd141da7ccf72b87b15"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classicu_1_1DateIntervalFormat.html">DateIntervalFormat</a>* icu::DateIntervalFormat::createInstance </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;&#160;</td>
          <td class="paramname"><em>skeleton</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classicu_1_1Locale.html">Locale</a> &amp;&#160;</td>
          <td class="paramname"><em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classicu_1_1DateIntervalInfo.html">DateIntervalInfo</a> &amp;&#160;</td>
          <td class="paramname"><em>dtitvinf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct a <a class="el" href="classicu_1_1DateIntervalFormat.html" title="DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent man...">DateIntervalFormat</a> from skeleton a <a class="el" href="classicu_1_1DateIntervalInfo.html" title="DateIntervalInfo is a public class for encapsulating localizable date time interval patterns...">DateIntervalInfo</a>, and the given locale. </p>
<p>In this factory method, user provides its own date interval pattern information, instead of using those pre-defined data in resource file. This factory method is for powerful users who want to provide their own interval patterns. </p>
<p>There are pre-defined skeletons (defined in udate.h) having predefined interval patterns in resource files. Users are encouraged to use those macros. For example: DateIntervalFormat::createInstance(UDAT_MONTH_DAY, status)</p>
<p>The <a class="el" href="classicu_1_1DateIntervalInfo.html" title="DateIntervalInfo is a public class for encapsulating localizable date time interval patterns...">DateIntervalInfo</a> provides the interval patterns. and the <a class="el" href="classicu_1_1DateIntervalInfo.html" title="DateIntervalInfo is a public class for encapsulating localizable date time interval patterns...">DateIntervalInfo</a> ownership remains to the caller.</p>
<p>User are encouraged to set default interval pattern in <a class="el" href="classicu_1_1DateIntervalInfo.html" title="DateIntervalInfo is a public class for encapsulating localizable date time interval patterns...">DateIntervalInfo</a> as well, if they want to set other interval patterns ( instead of reading the interval patterns from resource files). When the corresponding interval pattern for a largest calendar different field is not found ( if user not set it ), interval format fallback to the default interval pattern. If user does not provide default interval pattern, it fallback to "{date0} - {date1}"</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">skeleton</td><td>the skeleton on which interval format based. </td></tr>
    <tr><td class="paramname">locale</td><td>the given locale </td></tr>
    <tr><td class="paramname">dtitvinf</td><td>the <a class="el" href="classicu_1_1DateIntervalInfo.html" title="DateIntervalInfo is a public class for encapsulating localizable date time interval patterns...">DateIntervalInfo</a> object. </td></tr>
    <tr><td class="paramname">status</td><td>output param set to success/failure code on exit </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a date time interval formatter which the caller owns. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003491">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>
<h4>Sample code</h4>
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="dtitvfmt_8h.html">unicode/dtitvfmt.h</a>&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="ustdio_8h.html">unicode/ustdio.h</a>&quot;</span></div></div><!-- fragment --> <div class="fragment"><div class="line">        <a class="code" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *out = <a class="code" href="ustdio_8h.html#a97b3a4c3639271188f378bf87e2c957d">u_finit</a>(stdout, <a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <span class="stringliteral">&quot;UTF-8&quot;</span>);</div><div class="line">        <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> status =<a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9">U_ZERO_ERROR</a>;</div><div class="line">        UnicodeString data[] = {</div><div class="line">                UnicodeString(<span class="stringliteral">&quot;2007-9-10 10:10:10&quot;</span>),</div><div class="line">                UnicodeString(<span class="stringliteral">&quot;2007-10-10 10:10:10&quot;</span>),</div><div class="line">                UnicodeString(<span class="stringliteral">&quot;2007-10-10 22:10:10&quot;</span>)</div><div class="line">                };</div><div class="line">        <span class="comment">// to create 2 Date Intervals</span></div><div class="line">    Calendar *cal1 = <a class="code" href="classicu_1_1Calendar.html#ad2d72d348ce478cf1715dd79b7262c89">Calendar::createInstance</a>(status);</div><div class="line">        cal1-&gt;set(2007,9,10,10,10,10);</div><div class="line">        Calendar *cal2 = <a class="code" href="classicu_1_1Calendar.html#ad2d72d348ce478cf1715dd79b7262c89">Calendar::createInstance</a>(status);</div><div class="line">        cal2-&gt;set(2007,10,10,10,10,10);</div><div class="line">        Calendar *cal3 = <a class="code" href="classicu_1_1Calendar.html#ad2d72d348ce478cf1715dd79b7262c89">Calendar::createInstance</a>(status);</div><div class="line">        cal3-&gt;set(2007,10,10,22,10,10);</div><div class="line">        DateInterval* dtitvsample[] = {</div><div class="line">                        <span class="keyword">new</span> DateInterval(cal1-&gt;getTime(status),cal2-&gt;getTime(status)),</div><div class="line">            <span class="keyword">new</span> DateInterval(cal2-&gt;getTime(status),cal3-&gt;getTime(status))</div><div class="line">              };</div><div class="line">        UnicodeString skeletons[] = {</div><div class="line">            UnicodeString(<span class="stringliteral">&quot;yMMMd&quot;</span>),</div><div class="line">            UnicodeString(<span class="stringliteral">&quot;Hm&quot;</span>),</div><div class="line">                        0,</div><div class="line">        };</div><div class="line">                <a class="code" href="ustdio_8h.html#a6c47bcc0394a1d176c636a59aff0ff0a">u_printf</a>(<span class="stringliteral">&quot;%-10s%-22s%-22s%-45s%-35s\n&quot;</span>, <span class="stringliteral">&quot;Skeleton&quot;</span>, <span class="stringliteral">&quot;from&quot;</span>,<span class="stringliteral">&quot;to&quot;</span>, <span class="stringliteral">&quot;Date Interval in en_US&quot;</span>,<span class="stringliteral">&quot;Date Interval in Ja&quot;</span>);</div><div class="line">                <span class="comment">// Create an empty DateIntervalInfo object</span></div><div class="line">        DateIntervalInfo dtitvinf =  DateIntervalInfo(status);</div><div class="line">                <span class="comment">// Set Date Time internal pattern for MONTH, HOUR_OF_DAY</span></div><div class="line">        dtitvinf.setIntervalPattern(<span class="stringliteral">&quot;yMMMd&quot;</span>, <a class="code" href="ucal_8h.html#a02fe23bf33319052733c00c7a09ea912a9546c33a33caefb88822bd22d4667fe1">UCAL_MONTH</a>, <span class="stringliteral">&quot;y &#39;Diff&#39; MMM d --- MMM d&quot;</span>,status);</div><div class="line">        dtitvinf.setIntervalPattern(<span class="stringliteral">&quot;Hm&quot;</span>, <a class="code" href="ucal_8h.html#a02fe23bf33319052733c00c7a09ea912a022b239bf42bff7814930817c7190b4f">UCAL_HOUR_OF_DAY</a>, <span class="stringliteral">&quot;yyyy MMM d HH:mm ~ HH:mm&quot;</span>,status);</div><div class="line">                <span class="comment">// Set fallback interval pattern</span></div><div class="line">        dtitvinf.setFallbackIntervalPattern(<span class="stringliteral">&quot;{0} ~~~ {1}&quot;</span>,status);</div><div class="line">                <span class="comment">// Get the DateIntervalFormat with the custom pattern</span></div><div class="line">        UnicodeString formatEn,formatJa;</div><div class="line">                FieldPosition pos=0;</div><div class="line">                <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0;i&lt;2;i++){</div><div class="line">            <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j=0;skeletons[j]!=<a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>;j++) {</div><div class="line">                        <a class="code" href="ustdio_8h.html#aace6d50c4e497147fa383f36619b6691">u_fprintf</a>(out,<span class="stringliteral">&quot;%-10S%-22S%-22S&quot;</span>, skeletons[i].getTerminatedBuffer(),data[j].getTerminatedBuffer(), data[j+1].getTerminatedBuffer());</div><div class="line">            <a class="code" href="classicu_1_1DateIntervalFormat.html#ac7e02c89ac13b26e2059ca70f35e3d71">DateIntervalFormat</a>* dtitvfmtEn = <a class="code" href="classicu_1_1DateIntervalFormat.html#a84897fb6ea23efab339b1659985ad887">DateIntervalFormat::createInstance</a>(skeletons[i],<a class="code" href="classicu_1_1Locale.html#a9c0b495c3d3a8a7d77859bbbbebe0912">Locale::getEnglish</a>(),dtitvinf,status);</div><div class="line">            <a class="code" href="classicu_1_1DateIntervalFormat.html#ac7e02c89ac13b26e2059ca70f35e3d71">DateIntervalFormat</a>* dtitvfmtJa = <a class="code" href="classicu_1_1DateIntervalFormat.html#a84897fb6ea23efab339b1659985ad887">DateIntervalFormat::createInstance</a>(skeletons[i],<a class="code" href="classicu_1_1Locale.html#a04c5829675a1839f1862bda410d58eba">Locale::getJapanese</a>(),dtitvinf,status);</div><div class="line">                        formatEn.remove();</div><div class="line">                        formatJa.remove();</div><div class="line">                        dtitvfmtEn-&gt;format(dtitvsample[j],formatEn,pos,status);</div><div class="line">                        dtitvfmtJa-&gt;format(dtitvsample[j],formatJa,pos,status);</div><div class="line">                        <a class="code" href="ustdio_8h.html#aace6d50c4e497147fa383f36619b6691">u_fprintf</a>(out,<span class="stringliteral">&quot;%-45S%-35S\n&quot;</span>, formatEn.getTerminatedBuffer(),formatJa.getTerminatedBuffer());    </div><div class="line">            }</div><div class="line">       }</div><div class="line">        <a class="code" href="ustdio_8h.html#ab3241cbe6c98cc23a1a164b19d9f2d84">u_fclose</a>(out);</div></div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="a1c03d0aa3227b576da283a3ca03e3477"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a>&amp; icu::DateIntervalFormat::format </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1Formattable.html">Formattable</a> &amp;&#160;</td>
          <td class="paramname"><em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;&#160;</td>
          <td class="paramname"><em>appendTo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classicu_1_1FieldPosition.html">FieldPosition</a> &amp;&#160;</td>
          <td class="paramname"><em>fieldPosition</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> an object to produce a string. </p>
<p>This method handles <a class="el" href="classicu_1_1Formattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting. ">Formattable</a> objects with a <a class="el" href="classicu_1_1DateInterval.html" title="This class represents a date interval. ">DateInterval</a> type. If a the <a class="el" href="classicu_1_1Formattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting. ">Formattable</a> object type is not a <a class="el" href="classicu_1_1DateInterval.html" title="This class represents a date interval. ">DateInterval</a>, then it returns a failing UErrorCode.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">obj</td><td>The object to format. Must be a <a class="el" href="classicu_1_1DateInterval.html" title="This class represents a date interval. ">DateInterval</a>. </td></tr>
    <tr><td class="paramname">appendTo</td><td>Output parameter to receive result. Result is appended to existing contents. </td></tr>
    <tr><td class="paramname">fieldPosition</td><td>On input: an alignment field, if desired. On output: the offsets of the alignment field. There may be multiple instances of a given field type in an interval format; in this case the fieldPosition offsets refer to the first instance. </td></tr>
    <tr><td class="paramname">status</td><td>Output param filled with success/failure status. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Reference to 'appendTo' parameter. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003496">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

<p>Implements <a class="el" href="classicu_1_1Format.html#a68fb0a8875645f7ab11bb5230c03c212">icu::Format</a>.</p>

</div>
</div>
<a class="anchor" id="a4f2d3fef670324706ca011ad02fff523"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a>&amp; icu::DateIntervalFormat::format </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1DateInterval.html">DateInterval</a> *&#160;</td>
          <td class="paramname"><em>dtInterval</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;&#160;</td>
          <td class="paramname"><em>appendTo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classicu_1_1FieldPosition.html">FieldPosition</a> &amp;&#160;</td>
          <td class="paramname"><em>fieldPosition</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p><a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> a <a class="el" href="classicu_1_1DateInterval.html" title="This class represents a date interval. ">DateInterval</a> to produce a string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dtInterval</td><td><a class="el" href="classicu_1_1DateInterval.html" title="This class represents a date interval. ">DateInterval</a> to be formatted. </td></tr>
    <tr><td class="paramname">appendTo</td><td>Output parameter to receive result. Result is appended to existing contents. </td></tr>
    <tr><td class="paramname">fieldPosition</td><td>On input: an alignment field, if desired. On output: the offsets of the alignment field. There may be multiple instances of a given field type in an interval format; in this case the fieldPosition offsets refer to the first instance. </td></tr>
    <tr><td class="paramname">status</td><td>Output param filled with success/failure status. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Reference to 'appendTo' parameter. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003497">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a38eadbe1b85b22e2f6b588cda46e41aa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a>&amp; icu::DateIntervalFormat::format </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classicu_1_1Calendar.html">Calendar</a> &amp;&#160;</td>
          <td class="paramname"><em>fromCalendar</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classicu_1_1Calendar.html">Calendar</a> &amp;&#160;</td>
          <td class="paramname"><em>toCalendar</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;&#160;</td>
          <td class="paramname"><em>appendTo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classicu_1_1FieldPosition.html">FieldPosition</a> &amp;&#160;</td>
          <td class="paramname"><em>fieldPosition</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p><a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> 2 Calendars to produce a string. </p>
<p>Note: "fromCalendar" and "toCalendar" are not const, since calendar is not const in SimpleDateFormat::format(Calendar&amp;),</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fromCalendar</td><td>calendar set to the from date in date interval to be formatted into date interval string </td></tr>
    <tr><td class="paramname">toCalendar</td><td>calendar set to the to date in date interval to be formatted into date interval string </td></tr>
    <tr><td class="paramname">appendTo</td><td>Output parameter to receive result. Result is appended to existing contents. </td></tr>
    <tr><td class="paramname">fieldPosition</td><td>On input: an alignment field, if desired. On output: the offsets of the alignment field. There may be multiple instances of a given field type in an interval format; in this case the fieldPosition offsets refer to the first instance. </td></tr>
    <tr><td class="paramname">status</td><td>Output param filled with success/failure status. Caller needs to make sure it is SUCCESS at the function entrance </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Reference to 'appendTo' parameter. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003498">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="aabe6a26dc030145ee945e8ccc76ba773"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classicu_1_1DateFormat.html">DateFormat</a>* icu::DateIntervalFormat::getDateFormat </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the date formatter. </p>
<p>The <a class="el" href="classicu_1_1DateIntervalFormat.html" title="DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent man...">DateIntervalFormat</a> instance continues to own the returned DateFormatter object, and will use and possibly modify it during format operations. In a multi-threaded environment, the returned <a class="el" href="classicu_1_1DateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a> can only be used if it is certain that no other threads are concurrently using this DateIntervalFormatter, even for nominally const functions.</p>
<dl class="section return"><dt>Returns</dt><dd>the date formatter associated with this date interval formatter. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003501">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="aba35ebb5fff2693e5ac46245141709fb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classicu_1_1DateIntervalInfo.html">DateIntervalInfo</a>* icu::DateIntervalFormat::getDateIntervalInfo </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the date time interval patterns. </p>
<dl class="section return"><dt>Returns</dt><dd>the date time interval patterns associated with this date interval formatter. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003499">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a83b346abbc3b9efa5a3481782537a5b1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="uobject_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a> icu::DateIntervalFormat::getDynamicClassID </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns a unique class ID POLYMORPHICALLY. </p>
<p>Pure virtual override. This method is to implement a simple version of RTTI, since not all C++ compilers support genuine RTTI. Polymorphic <a class="el" href="classicu_1_1DateIntervalFormat.html#aa035d3ea07ce9bcb6c4802147826f7bb" title="Return true if the given Format objects are semantically equal. ">operator==()</a> and <a class="el" href="classicu_1_1DateIntervalFormat.html#ad7bae778642a3f39981953089e25a4d2" title="Clone this Format object polymorphically. ">clone()</a> methods call this method.</p>
<dl class="section return"><dt>Returns</dt><dd>The class ID for this object. All objects of a given class have the same class ID. Objects of other classes have different class IDs. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003506">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

<p>Reimplemented from <a class="el" href="classicu_1_1UObject.html#a1aa93096e880907080b503ff1fb0f8bc">icu::UObject</a>.</p>

</div>
</div>
<a class="anchor" id="a9aea0188906097aeb2c8c2256a4d14a2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="uobject_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a> icu::DateIntervalFormat::getStaticClassID </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the class ID for this class. </p>
<p>This is useful only for comparing to a return value from <a class="el" href="classicu_1_1DateIntervalFormat.html#a83b346abbc3b9efa5a3481782537a5b1" title="Returns a unique class ID POLYMORPHICALLY. ">getDynamicClassID()</a>. For example: </p><pre>
.   Base* polymorphic_pointer = createPolymorphicObject();
.   if (polymorphic_pointer-&gt;<a class="el" href="classicu_1_1DateIntervalFormat.html#a83b346abbc3b9efa5a3481782537a5b1" title="Returns a unique class ID POLYMORPHICALLY. ">getDynamicClassID()</a> ==
.       erived::getStaticClassID()) ...
</pre> <dl class="section return"><dt>Returns</dt><dd>The class ID for all objects of this class. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003505">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a4870dad87dae6abe3229555145402d00"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="classicu_1_1TimeZone.html">TimeZone</a>&amp; icu::DateIntervalFormat::getTimeZone </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns a reference to the <a class="el" href="classicu_1_1TimeZone.html" title="TimeZone represents a time zone offset, and also figures out daylight savings. ">TimeZone</a> used by this <a class="el" href="classicu_1_1DateIntervalFormat.html" title="DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent man...">DateIntervalFormat</a>'s calendar. </p>
<dl class="section return"><dt>Returns</dt><dd>the time zone associated with the calendar of <a class="el" href="classicu_1_1DateIntervalFormat.html" title="DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent man...">DateIntervalFormat</a>. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003502">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl>

</div>
</div>
<a class="anchor" id="af143829f93e6595a3def64e04506714e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> icu::DateIntervalFormat::operator!= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1Format.html">Format</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return true if the given <a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> objects are not semantically equal. </p>
<p>Objects of different subclasses are considered unequal. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">other</td><td>the object to be compared with. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the given <a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> objects are not semantically equal. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003495">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

<p>Definition at line <a class="el" href="dtitvfmt_8h_source.html#l01037">1037</a> of file <a class="el" href="dtitvfmt_8h_source.html">dtitvfmt.h</a>.</p>

<p>References <a class="el" href="namespaceicu.html#a1c2f6ca43e636f38d1a3291eb851e9f0">icu::operator==()</a>, and <a class="el" href="uversion_8h_source.html#l00132">U_NAMESPACE_END</a>.</p>

</div>
</div>
<a class="anchor" id="a6a989ee61d89f5f6363b0ef98c326daf"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classicu_1_1DateIntervalFormat.html">DateIntervalFormat</a>&amp; icu::DateIntervalFormat::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1DateIntervalFormat.html">DateIntervalFormat</a> &amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Assignment operator. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003508">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="aa035d3ea07ce9bcb6c4802147826f7bb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> icu::DateIntervalFormat::operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1Format.html">Format</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return true if the given <a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> objects are semantically equal. </p>
<p>Objects of different subclasses are considered unequal. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">other</td><td>the object to be compared with. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the given <a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> objects are semantically equal. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003494">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

<p>Implements <a class="el" href="classicu_1_1Format.html#ab2db8f1097b03f3660d329752370bdf7">icu::Format</a>.</p>

</div>
</div>
<a class="anchor" id="a2ee630aa393b4e1edfa97763579d051f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void icu::DateIntervalFormat::parseObject </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classicu_1_1Formattable.html">Formattable</a> &amp;&#160;</td>
          <td class="paramname"><em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classicu_1_1ParsePosition.html">ParsePosition</a> &amp;&#160;</td>
          <td class="paramname"><em>parse_pos</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Date interval parsing is not supported. </p>
<p>Please do not use. </p>
<p>This method should handle parsing of date time interval strings into <a class="el" href="classicu_1_1Formattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting. ">Formattable</a> objects with <a class="el" href="classicu_1_1DateInterval.html" title="This class represents a date interval. ">DateInterval</a> type, which is a pair of UDate. </p>
<p>Before calling, set parse_pos.index to the offset you want to start parsing at in the source. After calling, parse_pos.index is the end of the text you parsed. If error occurs, index is unchanged. </p>
<p>When parsing, leading whitespace is discarded (with a successful parse), while trailing whitespace is left as is. </p>
<p>See <a class="el" href="classicu_1_1Format.html#a292d797eb9d3bc8a42d8d8efba119a83" title="Parse a string to produce an object. ">Format::parseObject()</a> for more.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>The string to be parsed into an object. </td></tr>
    <tr><td class="paramname">result</td><td><a class="el" href="classicu_1_1Formattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting. ">Formattable</a> to be set to the parse result. If parse fails, return contents are undefined. </td></tr>
    <tr><td class="paramname">parse_pos</td><td>The position to start parsing at. Since no parsing is supported, upon return this param is unchanged. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A newly created Formattable* object, or NULL on failure. The caller owns this and should delete it when done. </dd></dl>
<dl class="internal"><dt><b><a class="el" href="internal.html#_internal000342">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. ICU 4.0 </dd></dl>

<p>Implements <a class="el" href="classicu_1_1Format.html#a292d797eb9d3bc8a42d8d8efba119a83">icu::Format</a>.</p>

</div>
</div>
<a class="anchor" id="afa15e3dd8d0be0b0c8420dca92c79b63"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void icu::DateIntervalFormat::setDateIntervalInfo </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1DateIntervalInfo.html">DateIntervalInfo</a> &amp;&#160;</td>
          <td class="paramname"><em>newIntervalPatterns</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the date time interval patterns. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">newIntervalPatterns</td><td>the given interval patterns to copy. </td></tr>
    <tr><td class="paramname">status</td><td>output param set to success/failure code on exit </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003500">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a01ac0804b2cc1c1c111a3165ab75e48f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void icu::DateIntervalFormat::setTimeZone </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1TimeZone.html">TimeZone</a> &amp;&#160;</td>
          <td class="paramname"><em>zone</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the time zone for the calendar used by this <a class="el" href="classicu_1_1DateIntervalFormat.html" title="DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent man...">DateIntervalFormat</a> object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">zone</td><td>the new time zone. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003504">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="dtitvfmt_8h_source.html">dtitvfmt.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>