Sophie

Sophie

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

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: ureldatefmt.h File 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><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html">source</a></li><li class="navelem"><a class="el" href="dir_3c42bef9a3e7804b3d74ebb2809ebf86.html">i18n</a></li><li class="navelem"><a class="el" href="dir_fa4147b4d9cbc9ae7619e21b25239322.html">unicode</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">ureldatefmt.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>C API: URelativeDateTimeFormatter, relative date formatting of unit + numeric offset.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="utypes_8h_source.html">unicode/utypes.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="unum_8h_source.html">unicode/unum.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="udisplaycontext_8h_source.html">unicode/udisplaycontext.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="localpointer_8h_source.html">unicode/localpointer.h</a>&quot;</code><br />
</div>
<p><a href="ureldatefmt_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespaceicu"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceicu.html">icu</a></td></tr>
<tr class="memdesc:namespaceicu"><td class="mdescLeft">&#160;</td><td class="mdescRight">File <a class="el" href="coll_8h.html" title="C++ API: Collation Service. ">coll.h</a>. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a1e39a5d341174db26c1a411a279206f1"><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="ureldatefmt_8h.html#a43daf21543096115200b055932f9ad58">UDateRelativeDateTimeFormatterStyle</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ureldatefmt_8h.html#a1e39a5d341174db26c1a411a279206f1">UDateRelativeDateTimeFormatterStyle</a></td></tr>
<tr class="memdesc:a1e39a5d341174db26c1a411a279206f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">The formatting style.  <a href="#a1e39a5d341174db26c1a411a279206f1">More...</a><br /></td></tr>
<tr class="separator:a1e39a5d341174db26c1a411a279206f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af538566719a39fda26a07311f95c50e9"><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761">URelativeDateTimeUnit</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ureldatefmt_8h.html#af538566719a39fda26a07311f95c50e9">URelativeDateTimeUnit</a></td></tr>
<tr class="memdesc:af538566719a39fda26a07311f95c50e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Represents the unit for formatting a relative date.  <a href="#af538566719a39fda26a07311f95c50e9">More...</a><br /></td></tr>
<tr class="separator:af538566719a39fda26a07311f95c50e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab96b7b55c8ea47b2b6476b9a91750bee"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="ureldatefmt_8h.html#ab96b7b55c8ea47b2b6476b9a91750bee">URelativeDateTimeFormatter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ureldatefmt_8h.html#ab96b7b55c8ea47b2b6476b9a91750bee">URelativeDateTimeFormatter</a></td></tr>
<tr class="memdesc:ab96b7b55c8ea47b2b6476b9a91750bee"><td class="mdescLeft">&#160;</td><td class="mdescRight">C typedef for struct URelativeDateTimeFormatter.  <a href="#ab96b7b55c8ea47b2b6476b9a91750bee">More...</a><br /></td></tr>
<tr class="separator:ab96b7b55c8ea47b2b6476b9a91750bee"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a43daf21543096115200b055932f9ad58"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ureldatefmt_8h.html#a43daf21543096115200b055932f9ad58">UDateRelativeDateTimeFormatterStyle</a> { <a class="el" href="ureldatefmt_8h.html#a43daf21543096115200b055932f9ad58a62546a4ccb7276b35b3533312fe111f0">UDAT_STYLE_LONG</a>, 
<a class="el" href="ureldatefmt_8h.html#a43daf21543096115200b055932f9ad58ad243e23edc643ab54e88dfa2c8f2f48f">UDAT_STYLE_SHORT</a>, 
<a class="el" href="ureldatefmt_8h.html#a43daf21543096115200b055932f9ad58ac90fae1d1a02e16a45a3fe9b7da8228b">UDAT_STYLE_NARROW</a>, 
<a class="el" href="ureldatefmt_8h.html#a43daf21543096115200b055932f9ad58a0991c40cb0f3772fd0bf56ed6205ef4d">UDAT_STYLE_COUNT</a>
 }<tr class="memdesc:a43daf21543096115200b055932f9ad58"><td class="mdescLeft">&#160;</td><td class="mdescRight">The formatting style.  <a href="ureldatefmt_8h.html#a43daf21543096115200b055932f9ad58">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a43daf21543096115200b055932f9ad58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa44d7fab2f7f58a0ceb8912faab59761"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761">URelativeDateTimeUnit</a> { <br />
&#160;&#160;<a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761aff7e41efdf6d3f8963c7a1eb250f4e01">UDAT_REL_UNIT_YEAR</a>, 
<a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761ac434cf4f8d9c4d852576eb1815024029">UDAT_REL_UNIT_QUARTER</a>, 
<a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761a771fa729d88c0e0c355b96db3d791abd">UDAT_REL_UNIT_MONTH</a>, 
<a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761a26ddbdab3bc419d259b56f2ce554e92b">UDAT_REL_UNIT_WEEK</a>, 
<br />
&#160;&#160;<a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761a56531929818b8f77af56a3df3c1f0393">UDAT_REL_UNIT_DAY</a>, 
<a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761ac5378c41078f88176b057ba6d3cae2b3">UDAT_REL_UNIT_HOUR</a>, 
<a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761ae8683b654676b789793ce0287cd44690">UDAT_REL_UNIT_MINUTE</a>, 
<a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761a3081a3b23329efb57d2c3434e65d8ec5">UDAT_REL_UNIT_SECOND</a>, 
<br />
&#160;&#160;<a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761a7d180592c18b029a9e0e0e034b3d3383">UDAT_REL_UNIT_SUNDAY</a>, 
<a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761afb747222ebf991953e82fc5fa9ae2059">UDAT_REL_UNIT_MONDAY</a>, 
<a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761ae9805c47b58dd20df1855cc81247a64b">UDAT_REL_UNIT_TUESDAY</a>, 
<a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761ab59f1ea86a099128e024bee41c22e003">UDAT_REL_UNIT_WEDNESDAY</a>, 
<br />
&#160;&#160;<a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761af9eb8ac96eeaa31cab5f82709a7a977b">UDAT_REL_UNIT_THURSDAY</a>, 
<a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761a38a3d2b245c6608ea03efcb4b56e8703">UDAT_REL_UNIT_FRIDAY</a>, 
<a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761a1665c51caa9469731531b2f7434d176f">UDAT_REL_UNIT_SATURDAY</a>, 
<a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761a74b147f6b7c11d7fff90c4249ffbb4f5">UDAT_REL_UNIT_COUNT</a>
<br />
 }<tr class="memdesc:aa44d7fab2f7f58a0ceb8912faab59761"><td class="mdescLeft">&#160;</td><td class="mdescRight">Represents the unit for formatting a relative date.  <a href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:aa44d7fab2f7f58a0ceb8912faab59761"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ad321349fc3e3f6da7c0b1a542dc49ffb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ureldatefmt_8h.html#ab96b7b55c8ea47b2b6476b9a91750bee">URelativeDateTimeFormatter</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ureldatefmt_8h.html#ad321349fc3e3f6da7c0b1a542dc49ffb">ureldatefmt_open</a> (const char *locale, <a class="el" href="unum_8h.html#aaeec8f4d21895a6f3efdedf14e8f946b">UNumberFormat</a> *nfToAdopt, <a class="el" href="ureldatefmt_8h.html#a43daf21543096115200b055932f9ad58">UDateRelativeDateTimeFormatterStyle</a> width, <a class="el" href="udisplaycontext_8h.html#ac80aa1aceff6c7ad2e9f983a19d8d868">UDisplayContext</a> capitalizationContext, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:ad321349fc3e3f6da7c0b1a542dc49ffb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Open a new URelativeDateTimeFormatter object for a given locale using the specified width and capitalizationContext, along with a number formatter (if desired) to override the default formatter that would be used for display of numeric field offsets.  <a href="#ad321349fc3e3f6da7c0b1a542dc49ffb">More...</a><br /></td></tr>
<tr class="separator:ad321349fc3e3f6da7c0b1a542dc49ffb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a996feb94120b9bb101de6eb8021da3e0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ureldatefmt_8h.html#a996feb94120b9bb101de6eb8021da3e0">ureldatefmt_close</a> (<a class="el" href="ureldatefmt_8h.html#ab96b7b55c8ea47b2b6476b9a91750bee">URelativeDateTimeFormatter</a> *reldatefmt)</td></tr>
<tr class="memdesc:a996feb94120b9bb101de6eb8021da3e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Close a URelativeDateTimeFormatter object.  <a href="#a996feb94120b9bb101de6eb8021da3e0">More...</a><br /></td></tr>
<tr class="separator:a996feb94120b9bb101de6eb8021da3e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa704c8439f83d27a30e4e29b4a092c4d"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ureldatefmt_8h.html#aa704c8439f83d27a30e4e29b4a092c4d">ureldatefmt_formatNumeric</a> (const <a class="el" href="ureldatefmt_8h.html#ab96b7b55c8ea47b2b6476b9a91750bee">URelativeDateTimeFormatter</a> *reldatefmt, double offset, <a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761">URelativeDateTimeUnit</a> unit, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *result, int32_t resultCapacity, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:aa704c8439f83d27a30e4e29b4a092c4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format a combination of URelativeDateTimeUnit and numeric offset using a numeric style, e.g.  <a href="#aa704c8439f83d27a30e4e29b4a092c4d">More...</a><br /></td></tr>
<tr class="separator:aa704c8439f83d27a30e4e29b4a092c4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3bf92424dc81e7012bfd10e7707dfd1"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ureldatefmt_8h.html#ad3bf92424dc81e7012bfd10e7707dfd1">ureldatefmt_format</a> (const <a class="el" href="ureldatefmt_8h.html#ab96b7b55c8ea47b2b6476b9a91750bee">URelativeDateTimeFormatter</a> *reldatefmt, double offset, <a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761">URelativeDateTimeUnit</a> unit, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *result, int32_t resultCapacity, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:ad3bf92424dc81e7012bfd10e7707dfd1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format a combination of URelativeDateTimeUnit and numeric offset using a text style if possible, e.g.  <a href="#ad3bf92424dc81e7012bfd10e7707dfd1">More...</a><br /></td></tr>
<tr class="separator:ad3bf92424dc81e7012bfd10e7707dfd1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b7acbaedfd148b3c72ff88ef9cbc8b8"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ureldatefmt_8h.html#a4b7acbaedfd148b3c72ff88ef9cbc8b8">ureldatefmt_combineDateAndTime</a> (const <a class="el" href="ureldatefmt_8h.html#ab96b7b55c8ea47b2b6476b9a91750bee">URelativeDateTimeFormatter</a> *reldatefmt, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *relativeDateString, int32_t relativeDateStringLen, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *timeString, int32_t timeStringLen, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *result, int32_t resultCapacity, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a4b7acbaedfd148b3c72ff88ef9cbc8b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Combines a relative date string and a time string in this object's locale.  <a href="#a4b7acbaedfd148b3c72ff88ef9cbc8b8">More...</a><br /></td></tr>
<tr class="separator:a4b7acbaedfd148b3c72ff88ef9cbc8b8"><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>C API: URelativeDateTimeFormatter, relative date formatting of unit + numeric offset. </p>
<p>Provides simple formatting of relative dates, in two ways </p><ul>
<li>
relative dates with a quantity e.g "in 5 days" </li>
<li>
relative dates without a quantity e.g "next Tuesday" </li>
</ul>
<p>This does not provide compound formatting for multiple units, other than the ability to combine a time string with a relative date, as in "next Tuesday at 3:45 PM". It also does not provide support for determining which unit to use, such as deciding between "in 7 days" and "in 1 week".</p>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000053">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>

<p>Definition in file <a class="el" href="ureldatefmt_8h_source.html">ureldatefmt.h</a>.</p>
</div><h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="a1e39a5d341174db26c1a411a279206f1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef enum <a class="el" href="ureldatefmt_8h.html#a43daf21543096115200b055932f9ad58">UDateRelativeDateTimeFormatterStyle</a>  <a class="el" href="ureldatefmt_8h.html#a43daf21543096115200b055932f9ad58">UDateRelativeDateTimeFormatterStyle</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The formatting style. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005506">Stable:</a></b></dt><dd>ICU 54 </dd></dl>

</div>
</div>
<a class="anchor" id="ab96b7b55c8ea47b2b6476b9a91750bee"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="ureldatefmt_8h.html#ab96b7b55c8ea47b2b6476b9a91750bee">URelativeDateTimeFormatter</a> <a class="el" href="ureldatefmt_8h.html#ab96b7b55c8ea47b2b6476b9a91750bee">URelativeDateTimeFormatter</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>C typedef for struct URelativeDateTimeFormatter. </p>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000056">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>

<p>Definition at line <a class="el" href="ureldatefmt_8h_source.html#l00186">186</a> of file <a class="el" href="ureldatefmt_8h_source.html">ureldatefmt.h</a>.</p>

</div>
</div>
<a class="anchor" id="af538566719a39fda26a07311f95c50e9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef enum <a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761">URelativeDateTimeUnit</a>  <a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761">URelativeDateTimeUnit</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Represents the unit for formatting a relative date. </p>
<p>e.g "in 5 days" or "next year" </p><dl class="draft"><dt><b><a class="el" href="draft.html#_draft000054">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="a43daf21543096115200b055932f9ad58"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="ureldatefmt_8h.html#a43daf21543096115200b055932f9ad58">UDateRelativeDateTimeFormatterStyle</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The formatting style. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005506">Stable:</a></b></dt><dd>ICU 54 </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a43daf21543096115200b055932f9ad58a62546a4ccb7276b35b3533312fe111f0"></a>UDAT_STYLE_LONG&#160;</td><td class="fielddoc">
<p>Everything spelled out. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005507">Stable:</a></b></dt><dd>ICU 54 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a43daf21543096115200b055932f9ad58ad243e23edc643ab54e88dfa2c8f2f48f"></a>UDAT_STYLE_SHORT&#160;</td><td class="fielddoc">
<p>Abbreviations used when possible. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005508">Stable:</a></b></dt><dd>ICU 54 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a43daf21543096115200b055932f9ad58ac90fae1d1a02e16a45a3fe9b7da8228b"></a>UDAT_STYLE_NARROW&#160;</td><td class="fielddoc">
<p>Use the shortest possible form. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005509">Stable:</a></b></dt><dd>ICU 54 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a43daf21543096115200b055932f9ad58a0991c40cb0f3772fd0bf56ed6205ef4d"></a>UDAT_STYLE_COUNT&#160;</td><td class="fielddoc">
<p>One more than the highest normal UDateRelativeDateTimeFormatterStyle value. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000430">Deprecated:</a></b></dt><dd>ICU 58 The numeric value may change over time, see ICU ticket #12420. </dd></dl>
</td></tr>
</table>

<p>Definition at line <a class="el" href="ureldatefmt_8h_source.html#l00044">44</a> of file <a class="el" href="ureldatefmt_8h_source.html">ureldatefmt.h</a>.</p>

</div>
</div>
<a class="anchor" id="aa44d7fab2f7f58a0ceb8912faab59761"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761">URelativeDateTimeUnit</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Represents the unit for formatting a relative date. </p>
<p>e.g "in 5 days" or "next year" </p><dl class="draft"><dt><b><a class="el" href="draft.html#_draft000054">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="aa44d7fab2f7f58a0ceb8912faab59761aff7e41efdf6d3f8963c7a1eb250f4e01"></a>UDAT_REL_UNIT_YEAR&#160;</td><td class="fielddoc">
<p>Specifies that relative unit is year, e.g. </p>
<p>"last year", "in 5 years". </p><dl class="draft"><dt><b><a class="el" href="draft.html#_draft000062">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aa44d7fab2f7f58a0ceb8912faab59761ac434cf4f8d9c4d852576eb1815024029"></a>UDAT_REL_UNIT_QUARTER&#160;</td><td class="fielddoc">
<p>Specifies that relative unit is quarter, e.g. </p>
<p>"last quarter", "in 5 quarters". </p><dl class="draft"><dt><b><a class="el" href="draft.html#_draft000063">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aa44d7fab2f7f58a0ceb8912faab59761a771fa729d88c0e0c355b96db3d791abd"></a>UDAT_REL_UNIT_MONTH&#160;</td><td class="fielddoc">
<p>Specifies that relative unit is month, e.g. </p>
<p>"last month", "in 5 months". </p><dl class="draft"><dt><b><a class="el" href="draft.html#_draft000064">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aa44d7fab2f7f58a0ceb8912faab59761a26ddbdab3bc419d259b56f2ce554e92b"></a>UDAT_REL_UNIT_WEEK&#160;</td><td class="fielddoc">
<p>Specifies that relative unit is week, e.g. </p>
<p>"last week", "in 5 weeks". </p><dl class="draft"><dt><b><a class="el" href="draft.html#_draft000065">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aa44d7fab2f7f58a0ceb8912faab59761a56531929818b8f77af56a3df3c1f0393"></a>UDAT_REL_UNIT_DAY&#160;</td><td class="fielddoc">
<p>Specifies that relative unit is day, e.g. </p>
<p>"yesterday", "in 5 days". </p><dl class="draft"><dt><b><a class="el" href="draft.html#_draft000066">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aa44d7fab2f7f58a0ceb8912faab59761ac5378c41078f88176b057ba6d3cae2b3"></a>UDAT_REL_UNIT_HOUR&#160;</td><td class="fielddoc">
<p>Specifies that relative unit is hour, e.g. </p>
<p>"1 hour ago", "in 5 hours". </p><dl class="draft"><dt><b><a class="el" href="draft.html#_draft000067">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aa44d7fab2f7f58a0ceb8912faab59761ae8683b654676b789793ce0287cd44690"></a>UDAT_REL_UNIT_MINUTE&#160;</td><td class="fielddoc">
<p>Specifies that relative unit is minute, e.g. </p>
<p>"1 minute ago", "in 5 minutes". </p><dl class="draft"><dt><b><a class="el" href="draft.html#_draft000068">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aa44d7fab2f7f58a0ceb8912faab59761a3081a3b23329efb57d2c3434e65d8ec5"></a>UDAT_REL_UNIT_SECOND&#160;</td><td class="fielddoc">
<p>Specifies that relative unit is second, e.g. </p>
<p>"1 second ago", "in 5 seconds". </p><dl class="draft"><dt><b><a class="el" href="draft.html#_draft000069">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aa44d7fab2f7f58a0ceb8912faab59761a7d180592c18b029a9e0e0e034b3d3383"></a>UDAT_REL_UNIT_SUNDAY&#160;</td><td class="fielddoc">
<p>Specifies that relative unit is Sunday, e.g. </p>
<p>"last Sunday", "this Sunday", "next Sunday", "in 5 Sundays". </p><dl class="draft"><dt><b><a class="el" href="draft.html#_draft000070">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aa44d7fab2f7f58a0ceb8912faab59761afb747222ebf991953e82fc5fa9ae2059"></a>UDAT_REL_UNIT_MONDAY&#160;</td><td class="fielddoc">
<p>Specifies that relative unit is Monday, e.g. </p>
<p>"last Monday", "this Monday", "next Monday", "in 5 Mondays". </p><dl class="draft"><dt><b><a class="el" href="draft.html#_draft000071">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aa44d7fab2f7f58a0ceb8912faab59761ae9805c47b58dd20df1855cc81247a64b"></a>UDAT_REL_UNIT_TUESDAY&#160;</td><td class="fielddoc">
<p>Specifies that relative unit is Tuesday, e.g. </p>
<p>"last Tuesday", "this Tuesday", "next Tuesday", "in 5 Tuesdays". </p><dl class="draft"><dt><b><a class="el" href="draft.html#_draft000072">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aa44d7fab2f7f58a0ceb8912faab59761ab59f1ea86a099128e024bee41c22e003"></a>UDAT_REL_UNIT_WEDNESDAY&#160;</td><td class="fielddoc">
<p>Specifies that relative unit is Wednesday, e.g. </p>
<p>"last Wednesday", "this Wednesday", "next Wednesday", "in 5 Wednesdays". </p><dl class="draft"><dt><b><a class="el" href="draft.html#_draft000073">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aa44d7fab2f7f58a0ceb8912faab59761af9eb8ac96eeaa31cab5f82709a7a977b"></a>UDAT_REL_UNIT_THURSDAY&#160;</td><td class="fielddoc">
<p>Specifies that relative unit is Thursday, e.g. </p>
<p>"last Thursday", "this Thursday", "next Thursday", "in 5 Thursdays". </p><dl class="draft"><dt><b><a class="el" href="draft.html#_draft000074">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aa44d7fab2f7f58a0ceb8912faab59761a38a3d2b245c6608ea03efcb4b56e8703"></a>UDAT_REL_UNIT_FRIDAY&#160;</td><td class="fielddoc">
<p>Specifies that relative unit is Friday, e.g. </p>
<p>"last Friday", "this Friday", "next Friday", "in 5 Fridays". </p><dl class="draft"><dt><b><a class="el" href="draft.html#_draft000075">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aa44d7fab2f7f58a0ceb8912faab59761a1665c51caa9469731531b2f7434d176f"></a>UDAT_REL_UNIT_SATURDAY&#160;</td><td class="fielddoc">
<p>Specifies that relative unit is Saturday, e.g. </p>
<p>"last Saturday", "this Saturday", "next Saturday", "in 5 Saturdays". </p><dl class="draft"><dt><b><a class="el" href="draft.html#_draft000076">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aa44d7fab2f7f58a0ceb8912faab59761a74b147f6b7c11d7fff90c4249ffbb4f5"></a>UDAT_REL_UNIT_COUNT&#160;</td><td class="fielddoc">
<p>One more than the highest normal URelativeDateTimeUnit value. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000431">Deprecated:</a></b></dt><dd>ICU 58 The numeric value may change over time, see ICU ticket #12420. </dd></dl>
</td></tr>
</table>

<p>Definition at line <a class="el" href="ureldatefmt_8h_source.html#l00078">78</a> of file <a class="el" href="ureldatefmt_8h_source.html">ureldatefmt.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a996feb94120b9bb101de6eb8021da3e0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ureldatefmt_close </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ureldatefmt_8h.html#ab96b7b55c8ea47b2b6476b9a91750bee">URelativeDateTimeFormatter</a> *&#160;</td>
          <td class="paramname"><em>reldatefmt</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Close a URelativeDateTimeFormatter object. </p>
<p>Once closed it may no longer be used. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">reldatefmt</td><td>The URelativeDateTimeFormatter object to close. </td></tr>
  </table>
  </dd>
</dl>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000058">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>

</div>
</div>
<a class="anchor" id="a4b7acbaedfd148b3c72ff88ef9cbc8b8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ureldatefmt_combineDateAndTime </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ureldatefmt_8h.html#ab96b7b55c8ea47b2b6476b9a91750bee">URelativeDateTimeFormatter</a> *&#160;</td>
          <td class="paramname"><em>reldatefmt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>relativeDateString</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>relativeDateStringLen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>timeString</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>timeStringLen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>resultCapacity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#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>Combines a relative date string and a time string in this object's locale. </p>
<p>This is done with the same date-time separator used for the default calendar in this locale to produce a result such as "yesterday at 3:45 PM".</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">reldatefmt</td><td>The URelativeDateTimeFormatter object specifying the format conventions. </td></tr>
    <tr><td class="paramname">relativeDateString</td><td>The relative date string. </td></tr>
    <tr><td class="paramname">relativeDateStringLen</td><td>The length of relativeDateString; may be -1 if relativeDateString is zero-terminated. </td></tr>
    <tr><td class="paramname">timeString</td><td>The time string. </td></tr>
    <tr><td class="paramname">timeStringLen</td><td>The length of timeString; may be -1 if timeString is zero-terminated. </td></tr>
    <tr><td class="paramname">result</td><td>A pointer to a buffer to receive the formatted result. </td></tr>
    <tr><td class="paramname">resultCapacity</td><td>The maximum size of result. </td></tr>
    <tr><td class="paramname">status</td><td>A pointer to a UErrorCode to receive any errors. In case of error status, the contents of result are undefined. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The length of the formatted result; may be greater than resultCapacity, in which case an error is returned. </dd></dl>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000061">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>

</div>
</div>
<a class="anchor" id="ad3bf92424dc81e7012bfd10e7707dfd1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ureldatefmt_format </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ureldatefmt_8h.html#ab96b7b55c8ea47b2b6476b9a91750bee">URelativeDateTimeFormatter</a> *&#160;</td>
          <td class="paramname"><em>reldatefmt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761">URelativeDateTimeUnit</a>&#160;</td>
          <td class="paramname"><em>unit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>resultCapacity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#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>Format a combination of URelativeDateTimeUnit and numeric offset using a text style if possible, e.g. </p>
<p>"last week", "this week", "next week", "yesterday", "tomorrow". Falls back to numeric style if no appropriate text term is available for the specified offset in the object's locale.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">reldatefmt</td><td>The URelativeDateTimeFormatter object specifying the format conventions. </td></tr>
    <tr><td class="paramname">offset</td><td>The signed offset for the specified unit. </td></tr>
    <tr><td class="paramname">unit</td><td>The unit to use when formatting the relative date, e.g. UDAT_REL_UNIT_WEEK, UDAT_REL_UNIT_FRIDAY. </td></tr>
    <tr><td class="paramname">result</td><td>A pointer to a buffer to receive the formatted result. </td></tr>
    <tr><td class="paramname">resultCapacity</td><td>The maximum size of result. </td></tr>
    <tr><td class="paramname">status</td><td>A pointer to a UErrorCode to receive any errors. In case of error status, the contents of result are undefined. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The length of the formatted result; may be greater than resultCapacity, in which case an error is returned. </dd></dl>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000060">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>

</div>
</div>
<a class="anchor" id="aa704c8439f83d27a30e4e29b4a092c4d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ureldatefmt_formatNumeric </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ureldatefmt_8h.html#ab96b7b55c8ea47b2b6476b9a91750bee">URelativeDateTimeFormatter</a> *&#160;</td>
          <td class="paramname"><em>reldatefmt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ureldatefmt_8h.html#aa44d7fab2f7f58a0ceb8912faab59761">URelativeDateTimeUnit</a>&#160;</td>
          <td class="paramname"><em>unit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>resultCapacity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#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>Format a combination of URelativeDateTimeUnit and numeric offset using a numeric style, e.g. </p>
<p>"1 week ago", "in 1 week", "5 weeks ago", "in 5 weeks".</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">reldatefmt</td><td>The URelativeDateTimeFormatter object specifying the format conventions. </td></tr>
    <tr><td class="paramname">offset</td><td>The signed offset for the specified unit. This will be formatted according to this object's UNumberFormat object. </td></tr>
    <tr><td class="paramname">unit</td><td>The unit to use when formatting the relative date, e.g. UDAT_REL_UNIT_WEEK, UDAT_REL_UNIT_FRIDAY. </td></tr>
    <tr><td class="paramname">result</td><td>A pointer to a buffer to receive the formatted result. </td></tr>
    <tr><td class="paramname">resultCapacity</td><td>The maximum size of result. </td></tr>
    <tr><td class="paramname">status</td><td>A pointer to a UErrorCode to receive any errors. In case of error status, the contents of result are undefined. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The length of the formatted result; may be greater than resultCapacity, in which case an error is returned. </dd></dl>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000059">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>

</div>
</div>
<a class="anchor" id="ad321349fc3e3f6da7c0b1a542dc49ffb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ureldatefmt_8h.html#ab96b7b55c8ea47b2b6476b9a91750bee">URelativeDateTimeFormatter</a>* ureldatefmt_open </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="unum_8h.html#aaeec8f4d21895a6f3efdedf14e8f946b">UNumberFormat</a> *&#160;</td>
          <td class="paramname"><em>nfToAdopt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ureldatefmt_8h.html#a43daf21543096115200b055932f9ad58">UDateRelativeDateTimeFormatterStyle</a>&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="udisplaycontext_8h.html#ac80aa1aceff6c7ad2e9f983a19d8d868">UDisplayContext</a>&#160;</td>
          <td class="paramname"><em>capitalizationContext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#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>Open a new URelativeDateTimeFormatter object for a given locale using the specified width and capitalizationContext, along with a number formatter (if desired) to override the default formatter that would be used for display of numeric field offsets. </p>
<p>The default formatter typically rounds toward 0 and has a minimum of 0 fraction digits and a maximum of 3 fraction digits (i.e. it will show as many decimal places as necessary up to 3, without showing trailing 0s).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">locale</td><td>The locale </td></tr>
    <tr><td class="paramname">nfToAdopt</td><td>A number formatter to set for this URelativeDateTimeFormatter object (instead of the default decimal formatter). Ownership of this UNumberFormat object will pass to the URelativeDateTimeFormatter object (the URelativeDateTimeFormatter adopts the UNumberFormat), which becomes responsible for closing it. If the caller wishes to retain ownership of the UNumberFormat object, the caller must clone it (with unum_clone) and pass the clone to ureldatefmt_open. May be NULL to use the default decimal formatter. </td></tr>
    <tr><td class="paramname">width</td><td>The width - wide, short, narrow, etc. </td></tr>
    <tr><td class="paramname">capitalizationContext</td><td>A value from UDisplayContext that pertains to capitalization, e.g. UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE. </td></tr>
    <tr><td class="paramname">status</td><td>A pointer to a UErrorCode to receive any errors. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to a URelativeDateTimeFormatter object for the specified locale, or NULL if an error occurred. </dd></dl>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000057">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 57 </dd></dl>

</div>
</div>
</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>