📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: Apache
2026-06-22 18:24:22
📂
/ (Root)
/
opt
/
alt
/
alt-nodejs19
/
root
/
usr
/
share
/
doc
/
alt-nodejs19-libicu-doc
📍 /opt/alt/alt-nodejs19/root/usr/share/doc/alt-nodejs19-libicu-doc
🔄 Refresh
✏️
Editing: classFormattedRelativeDateTime.html
Read Only
<!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.14"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>ICU 72.1: icu::FormattedRelativeDateTime 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 72.1  <span id="projectnumber">72.1</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.14 --> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('',false,false,'search.php','Search'); }); /* @license-end */</script> <div id="main-nav"></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_1FormattedRelativeDateTime.html">FormattedRelativeDateTime</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="#friends">Friends</a> </div> <div class="headertitle"> <div class="title">icu::FormattedRelativeDateTime Class Reference</div> </div> </div><!--header--> <div class="contents"> <p>An immutable class containing the result of a relative datetime formatting operation. <a href="classicu_1_1FormattedRelativeDateTime.html#details">More...</a></p> <p><code>#include <<a class="el" href="reldatefmt_8h_source.html">reldatefmt.h</a>></code></p> <div class="dynheader"> Inheritance diagram for icu::FormattedRelativeDateTime:</div> <div class="dyncontent"> <div class="center"> <img src="classicu_1_1FormattedRelativeDateTime.png" usemap="#icu::FormattedRelativeDateTime_map" alt=""/> <map id="icu::FormattedRelativeDateTime_map" name="icu::FormattedRelativeDateTime_map"> <area href="classicu_1_1UMemory.html" title="UMemory is the common ICU base class. " alt="icu::UMemory" shape="rect" coords="0,0,188,24"/> <area href="classicu_1_1FormattedValue.html" title="An abstract formatted value: a string with associated field attributes. " alt="icu::FormattedValue" shape="rect" coords="198,0,386,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:a40705fc26ebfe77403b9a43c18699983"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1FormattedRelativeDateTime.html#a40705fc26ebfe77403b9a43c18699983">FormattedRelativeDateTime</a> ()</td></tr> <tr class="memdesc:a40705fc26ebfe77403b9a43c18699983"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor; makes an empty <a class="el" href="classicu_1_1FormattedRelativeDateTime.html" title="An immutable class containing the result of a relative datetime formatting operation. ">FormattedRelativeDateTime</a>. <a href="#a40705fc26ebfe77403b9a43c18699983">More...</a><br /></td></tr> <tr class="separator:a40705fc26ebfe77403b9a43c18699983"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:af2d08673e5aa091fbb2c05d49a64d802"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1FormattedRelativeDateTime.html#af2d08673e5aa091fbb2c05d49a64d802">FormattedRelativeDateTime</a> (<a class="el" href="classicu_1_1FormattedRelativeDateTime.html">FormattedRelativeDateTime</a> &&src) <a class="el" href="platform_8h.html#a6e25fe50df36f1f6553f54e7e7ee3bb1">U_NOEXCEPT</a></td></tr> <tr class="memdesc:af2d08673e5aa091fbb2c05d49a64d802"><td class="mdescLeft"> </td><td class="mdescRight">Move constructor: Leaves the source <a class="el" href="classicu_1_1FormattedRelativeDateTime.html" title="An immutable class containing the result of a relative datetime formatting operation. ">FormattedRelativeDateTime</a> in an undefined state. <a href="#af2d08673e5aa091fbb2c05d49a64d802">More...</a><br /></td></tr> <tr class="separator:af2d08673e5aa091fbb2c05d49a64d802"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a746e15082b6ea047bb299916878f4e27"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1FormattedRelativeDateTime.html#a746e15082b6ea047bb299916878f4e27">~FormattedRelativeDateTime</a> () <a class="el" href="umachine_8h.html#a383ef11f2d8ffe69eca94aaba6f8cbc5">U_OVERRIDE</a></td></tr> <tr class="memdesc:a746e15082b6ea047bb299916878f4e27"><td class="mdescLeft"> </td><td class="mdescRight">Destruct an instance of <a class="el" href="classicu_1_1FormattedRelativeDateTime.html" title="An immutable class containing the result of a relative datetime formatting operation. ">FormattedRelativeDateTime</a>. <a href="#a746e15082b6ea047bb299916878f4e27">More...</a><br /></td></tr> <tr class="separator:a746e15082b6ea047bb299916878f4e27"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aa21c53f85986ae92d037681303d30864"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1FormattedRelativeDateTime.html#aa21c53f85986ae92d037681303d30864">FormattedRelativeDateTime</a> (const <a class="el" href="classicu_1_1FormattedRelativeDateTime.html">FormattedRelativeDateTime</a> &)=delete</td></tr> <tr class="memdesc:aa21c53f85986ae92d037681303d30864"><td class="mdescLeft"> </td><td class="mdescRight">Copying not supported; use move constructor instead. <a href="#aa21c53f85986ae92d037681303d30864">More...</a><br /></td></tr> <tr class="separator:aa21c53f85986ae92d037681303d30864"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a01f455e0682e72b30286a8e8b804070b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1FormattedRelativeDateTime.html">FormattedRelativeDateTime</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1FormattedRelativeDateTime.html#a01f455e0682e72b30286a8e8b804070b">operator=</a> (const <a class="el" href="classicu_1_1FormattedRelativeDateTime.html">FormattedRelativeDateTime</a> &)=delete</td></tr> <tr class="memdesc:a01f455e0682e72b30286a8e8b804070b"><td class="mdescLeft"> </td><td class="mdescRight">Copying not supported; use move assignment instead. <a href="#a01f455e0682e72b30286a8e8b804070b">More...</a><br /></td></tr> <tr class="separator:a01f455e0682e72b30286a8e8b804070b"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab7dae79be349121dd1e5fc28dd6c01a7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1FormattedRelativeDateTime.html">FormattedRelativeDateTime</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1FormattedRelativeDateTime.html#ab7dae79be349121dd1e5fc28dd6c01a7">operator=</a> (<a class="el" href="classicu_1_1FormattedRelativeDateTime.html">FormattedRelativeDateTime</a> &&src) <a class="el" href="platform_8h.html#a6e25fe50df36f1f6553f54e7e7ee3bb1">U_NOEXCEPT</a></td></tr> <tr class="memdesc:ab7dae79be349121dd1e5fc28dd6c01a7"><td class="mdescLeft"> </td><td class="mdescRight">Move assignment: Leaves the source <a class="el" href="classicu_1_1FormattedRelativeDateTime.html" title="An immutable class containing the result of a relative datetime formatting operation. ">FormattedRelativeDateTime</a> in an undefined state. <a href="#ab7dae79be349121dd1e5fc28dd6c01a7">More...</a><br /></td></tr> <tr class="separator:ab7dae79be349121dd1e5fc28dd6c01a7"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:af222188b284721bab14ae89336b61374"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1FormattedRelativeDateTime.html#af222188b284721bab14ae89336b61374">toString</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const <a class="el" href="umachine_8h.html#a383ef11f2d8ffe69eca94aaba6f8cbc5">U_OVERRIDE</a></td></tr> <tr class="memdesc:af222188b284721bab14ae89336b61374"><td class="mdescLeft"> </td><td class="mdescRight">Returns the formatted string as a self-contained <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>. <br /> <a href="#af222188b284721bab14ae89336b61374">More...</a><br /></td></tr> <tr class="separator:af222188b284721bab14ae89336b61374"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a6624311e1162194c94f9ff55e38d3f59"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1FormattedRelativeDateTime.html#a6624311e1162194c94f9ff55e38d3f59">toTempString</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const <a class="el" href="umachine_8h.html#a383ef11f2d8ffe69eca94aaba6f8cbc5">U_OVERRIDE</a></td></tr> <tr class="memdesc:a6624311e1162194c94f9ff55e38d3f59"><td class="mdescLeft"> </td><td class="mdescRight">Returns the formatted string as a read-only alias to memory owned by the <a class="el" href="classicu_1_1FormattedValue.html" title="An abstract formatted value: a string with associated field attributes. ">FormattedValue</a>. <br /> <a href="#a6624311e1162194c94f9ff55e38d3f59">More...</a><br /></td></tr> <tr class="separator:a6624311e1162194c94f9ff55e38d3f59"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a624dd08d8303343df7c5b76cd2ec92ff"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1Appendable.html">Appendable</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1FormattedRelativeDateTime.html#a624dd08d8303343df7c5b76cd2ec92ff">appendTo</a> (<a class="el" href="classicu_1_1Appendable.html">Appendable</a> &appendable, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const <a class="el" href="umachine_8h.html#a383ef11f2d8ffe69eca94aaba6f8cbc5">U_OVERRIDE</a></td></tr> <tr class="memdesc:a624dd08d8303343df7c5b76cd2ec92ff"><td class="mdescLeft"> </td><td class="mdescRight">Appends the formatted string to an <a class="el" href="classicu_1_1Appendable.html" title="Base class for objects to which Unicode characters and strings can be appended. ">Appendable</a>. <br /> <a href="#a624dd08d8303343df7c5b76cd2ec92ff">More...</a><br /></td></tr> <tr class="separator:a624dd08d8303343df7c5b76cd2ec92ff"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a483dea36e3eee2d1bbcd616c132eb4ea"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1FormattedRelativeDateTime.html#a483dea36e3eee2d1bbcd616c132eb4ea">nextPosition</a> (<a class="el" href="classicu_1_1ConstrainedFieldPosition.html">ConstrainedFieldPosition</a> &cfpos, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const <a class="el" href="umachine_8h.html#a383ef11f2d8ffe69eca94aaba6f8cbc5">U_OVERRIDE</a></td></tr> <tr class="memdesc:a483dea36e3eee2d1bbcd616c132eb4ea"><td class="mdescLeft"> </td><td class="mdescRight">Iterates over field positions in the <a class="el" href="classicu_1_1FormattedValue.html" title="An abstract formatted value: a string with associated field attributes. ">FormattedValue</a>. <br /> <a href="#a483dea36e3eee2d1bbcd616c132eb4ea">More...</a><br /></td></tr> <tr class="separator:a483dea36e3eee2d1bbcd616c132eb4ea"><td class="memSeparator" colspan="2"> </td></tr> <tr class="inherit_header pub_methods_classicu_1_1FormattedValue"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classicu_1_1FormattedValue')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classicu_1_1FormattedValue.html">icu::FormattedValue</a></td></tr> <tr class="memitem:adb5a88697d2c271940ef68419f12cfea inherit pub_methods_classicu_1_1FormattedValue"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1FormattedValue.html#adb5a88697d2c271940ef68419f12cfea">~FormattedValue</a> ()</td></tr> <tr class="separator:adb5a88697d2c271940ef68419f12cfea inherit pub_methods_classicu_1_1FormattedValue"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a> Friends</h2></td></tr> <tr class="memitem:a958726e4df2b02508bbca8c645474385"><td class="memItemLeft" align="right" valign="top"><a id="a958726e4df2b02508bbca8c645474385"></a> class </td><td class="memItemRight" valign="bottom"><b>RelativeDateTimeFormatter</b></td></tr> <tr class="separator:a958726e4df2b02508bbca8c645474385"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>An immutable class containing the result of a relative datetime formatting operation. </p> <p>Instances of this class are immutable and thread-safe.</p> <p>Not intended for public subclassing.</p> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable005265">Stable:</a></b></dt><dd>ICU 64 </dd></dl> <p class="definition">Definition at line <a class="el" href="reldatefmt_8h_source.html#l00274">274</a> of file <a class="el" href="reldatefmt_8h_source.html">reldatefmt.h</a>.</p> </div><h2 class="groupheader">Constructor & Destructor Documentation</h2> <a id="a40705fc26ebfe77403b9a43c18699983"></a> <h2 class="memtitle"><span class="permalink"><a href="#a40705fc26ebfe77403b9a43c18699983">◆ </a></span>FormattedRelativeDateTime() <span class="overload">[1/3]</span></h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">icu::FormattedRelativeDateTime::FormattedRelativeDateTime </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></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>Default constructor; makes an empty <a class="el" href="classicu_1_1FormattedRelativeDateTime.html" title="An immutable class containing the result of a relative datetime formatting operation. ">FormattedRelativeDateTime</a>. </p> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable005267">Stable:</a></b></dt><dd>ICU 64 </dd></dl> <p class="definition">Definition at line <a class="el" href="reldatefmt_8h_source.html#l00280">280</a> of file <a class="el" href="reldatefmt_8h_source.html">reldatefmt.h</a>.</p> </div> </div> <a id="af2d08673e5aa091fbb2c05d49a64d802"></a> <h2 class="memtitle"><span class="permalink"><a href="#af2d08673e5aa091fbb2c05d49a64d802">◆ </a></span>FormattedRelativeDateTime() <span class="overload">[2/3]</span></h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">icu::FormattedRelativeDateTime::FormattedRelativeDateTime </td> <td>(</td> <td class="paramtype"><a class="el" href="classicu_1_1FormattedRelativeDateTime.html">FormattedRelativeDateTime</a> && </td> <td class="paramname"><em>src</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Move constructor: Leaves the source <a class="el" href="classicu_1_1FormattedRelativeDateTime.html" title="An immutable class containing the result of a relative datetime formatting operation. ">FormattedRelativeDateTime</a> in an undefined state. </p> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable005268">Stable:</a></b></dt><dd>ICU 64 </dd></dl> </div> </div> <a id="a746e15082b6ea047bb299916878f4e27"></a> <h2 class="memtitle"><span class="permalink"><a href="#a746e15082b6ea047bb299916878f4e27">◆ </a></span>~FormattedRelativeDateTime()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual icu::FormattedRelativeDateTime::~FormattedRelativeDateTime </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>Destruct an instance of <a class="el" href="classicu_1_1FormattedRelativeDateTime.html" title="An immutable class containing the result of a relative datetime formatting operation. ">FormattedRelativeDateTime</a>. </p> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable005269">Stable:</a></b></dt><dd>ICU 64 </dd></dl> </div> </div> <a id="aa21c53f85986ae92d037681303d30864"></a> <h2 class="memtitle"><span class="permalink"><a href="#aa21c53f85986ae92d037681303d30864">◆ </a></span>FormattedRelativeDateTime() <span class="overload">[3/3]</span></h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">icu::FormattedRelativeDateTime::FormattedRelativeDateTime </td> <td>(</td> <td class="paramtype">const <a class="el" href="classicu_1_1FormattedRelativeDateTime.html">FormattedRelativeDateTime</a> & </td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">delete</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Copying not supported; use move constructor instead. </p> </div> </div> <h2 class="groupheader">Member Function Documentation</h2> <a id="a624dd08d8303343df7c5b76cd2ec92ff"></a> <h2 class="memtitle"><span class="permalink"><a href="#a624dd08d8303343df7c5b76cd2ec92ff">◆ </a></span>appendTo()</h2> <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_1Appendable.html">Appendable</a>& icu::FormattedRelativeDateTime::appendTo </td> <td>(</td> <td class="paramtype"><a class="el" href="classicu_1_1Appendable.html">Appendable</a> & </td> <td class="paramname"><em>appendable</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> & </td> <td class="paramname"><em>status</em> </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>Appends the formatted string to an <a class="el" href="classicu_1_1Appendable.html" title="Base class for objects to which Unicode characters and strings can be appended. ">Appendable</a>. <br /> </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">appendable</td><td>The <a class="el" href="classicu_1_1Appendable.html" title="Base class for objects to which Unicode characters and strings can be appended. ">Appendable</a> to which to append the string output. </td></tr> <tr><td class="paramname">status</td><td>Set if an error occurs. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The same <a class="el" href="classicu_1_1Appendable.html" title="Base class for objects to which Unicode characters and strings can be appended. ">Appendable</a>, for chaining.</dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable004176">Stable:</a></b></dt><dd>ICU 64 </dd></dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="classicu_1_1Appendable.html" title="Base class for objects to which Unicode characters and strings can be appended. ">Appendable</a> </dd></dl> <p>Implements <a class="el" href="classicu_1_1FormattedValue.html#adf0972bb328adad06a251136ad154471">icu::FormattedValue</a>.</p> </div> </div> <a id="a483dea36e3eee2d1bbcd616c132eb4ea"></a> <h2 class="memtitle"><span class="permalink"><a href="#a483dea36e3eee2d1bbcd616c132eb4ea">◆ </a></span>nextPosition()</h2> <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::FormattedRelativeDateTime::nextPosition </td> <td>(</td> <td class="paramtype"><a class="el" href="classicu_1_1ConstrainedFieldPosition.html">ConstrainedFieldPosition</a> & </td> <td class="paramname"><em>cfpos</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> & </td> <td class="paramname"><em>status</em> </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>Iterates over field positions in the <a class="el" href="classicu_1_1FormattedValue.html" title="An abstract formatted value: a string with associated field attributes. ">FormattedValue</a>. <br /> </p> <p>This lets you determine the position of specific types of substrings, like a month or a decimal separator.</p> <p>To loop over all field positions: </p><pre class="fragment">ConstrainedFieldPosition cfpos; while (fmtval.nextPosition(cfpos, status)) { // handle the field position; get information from cfpos } </pre><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">cfpos</td><td>The object used for iteration state. This can provide constraints to iterate over only one specific category or field; see <a class="el" href="classicu_1_1ConstrainedFieldPosition.html#a4813682fb0f5aca0438209a780831511" title="Sets a constraint on the field category. ">ConstrainedFieldPosition::constrainCategory</a> and <a class="el" href="classicu_1_1ConstrainedFieldPosition.html#a36525bf694e70c4578e20309588a4847" title="Sets a constraint on the category and field. ">ConstrainedFieldPosition::constrainField</a>. </td></tr> <tr><td class="paramname">status</td><td>Set if an error occurs. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>true if a new occurrence of the field was found; false otherwise or if an error was set.</dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable004177">Stable:</a></b></dt><dd>ICU 64 </dd></dl> <p>Implements <a class="el" href="classicu_1_1FormattedValue.html#a3c15a47c141a9631c4db7b4bb0251395">icu::FormattedValue</a>.</p> </div> </div> <a id="a01f455e0682e72b30286a8e8b804070b"></a> <h2 class="memtitle"><span class="permalink"><a href="#a01f455e0682e72b30286a8e8b804070b">◆ </a></span>operator=() <span class="overload">[1/2]</span></h2> <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_1FormattedRelativeDateTime.html">FormattedRelativeDateTime</a>& icu::FormattedRelativeDateTime::operator= </td> <td>(</td> <td class="paramtype">const <a class="el" href="classicu_1_1FormattedRelativeDateTime.html">FormattedRelativeDateTime</a> & </td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">delete</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Copying not supported; use move assignment instead. </p> </div> </div> <a id="ab7dae79be349121dd1e5fc28dd6c01a7"></a> <h2 class="memtitle"><span class="permalink"><a href="#ab7dae79be349121dd1e5fc28dd6c01a7">◆ </a></span>operator=() <span class="overload">[2/2]</span></h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classicu_1_1FormattedRelativeDateTime.html">FormattedRelativeDateTime</a>& icu::FormattedRelativeDateTime::operator= </td> <td>(</td> <td class="paramtype"><a class="el" href="classicu_1_1FormattedRelativeDateTime.html">FormattedRelativeDateTime</a> && </td> <td class="paramname"><em>src</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Move assignment: Leaves the source <a class="el" href="classicu_1_1FormattedRelativeDateTime.html" title="An immutable class containing the result of a relative datetime formatting operation. ">FormattedRelativeDateTime</a> in an undefined state. </p> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable005270">Stable:</a></b></dt><dd>ICU 64 </dd></dl> </div> </div> <a id="af222188b284721bab14ae89336b61374"></a> <h2 class="memtitle"><span class="permalink"><a href="#af222188b284721bab14ae89336b61374">◆ </a></span>toString()</h2> <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_1UnicodeString.html">UnicodeString</a> icu::FormattedRelativeDateTime::toString </td> <td>(</td> <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> & </td> <td class="paramname"><em>status</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>Returns the formatted string as a self-contained <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>. <br /> </p> <p>If you need the string within the current scope only, consider <a class="el" href="classicu_1_1FormattedRelativeDateTime.html#a6624311e1162194c94f9ff55e38d3f59" title="Returns the formatted string as a read-only alias to memory owned by the FormattedValue. ">toTempString</a>.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">status</td><td>Set if an error occurs. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>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> containing the formatted string.</dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable004174">Stable:</a></b></dt><dd>ICU 64 </dd></dl> <p>Implements <a class="el" href="classicu_1_1FormattedValue.html#ab65eae49614210cde61f68e0543993c3">icu::FormattedValue</a>.</p> </div> </div> <a id="a6624311e1162194c94f9ff55e38d3f59"></a> <h2 class="memtitle"><span class="permalink"><a href="#a6624311e1162194c94f9ff55e38d3f59">◆ </a></span>toTempString()</h2> <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_1UnicodeString.html">UnicodeString</a> icu::FormattedRelativeDateTime::toTempString </td> <td>(</td> <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> & </td> <td class="paramname"><em>status</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>Returns the formatted string as a read-only alias to memory owned by the <a class="el" href="classicu_1_1FormattedValue.html" title="An abstract formatted value: a string with associated field attributes. ">FormattedValue</a>. <br /> </p> <p>The return value is valid only as long as this <a class="el" href="classicu_1_1FormattedValue.html" title="An abstract formatted value: a string with associated field attributes. ">FormattedValue</a> is present and unchanged in memory. If you need the string outside the current scope, consider <a class="el" href="classicu_1_1FormattedRelativeDateTime.html#af222188b284721bab14ae89336b61374" title="Returns the formatted string as a self-contained UnicodeString. ">toString</a>.</p> <p>The buffer returned by calling <a class="el" href="classicu_1_1UnicodeString.html#ae9ea82f86d91d9d978befb155cbec3cf" title="Get a read/write pointer to the internal buffer. ">UnicodeString::getBuffer()</a> on the return value is guaranteed to be NUL-terminated.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">status</td><td>Set if an error occurs. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>a temporary <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> containing the formatted string.</dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable004175">Stable:</a></b></dt><dd>ICU 64 </dd></dl> <p>Implements <a class="el" href="classicu_1_1FormattedValue.html#ac79bc980f05406a36565e38268cc5470">icu::FormattedValue</a>.</p> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="reldatefmt_8h_source.html">reldatefmt.h</a></li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.14 </small></address> </body> </html>
💾 Save Changes
❌ Cancel