Server IP : 103.119.228.120 / Your IP : 18.188.63.71 Web Server : Apache System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64 User : nobody ( 99) PHP Version : 5.6.40 Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/local/ssl/local/ssl/local/easy/share/doc/easy-libicu-doc-4.0.1/ |
Upload File : |
<!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.5"/> <title>ICU 4.0.1: DateFormat 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="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </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 style="padding-left: 0.5em;"> <div id="projectname">ICU 4.0.1 </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.5 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li class="current"><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="classes.html"><span>Data Structure Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Data Fields</span></a></li> </ul> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark"> </span>Pages</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-types">Public Types</a> | <a href="#pub-methods">Public Member Functions</a> | <a href="#pub-static-methods">Static Public Member Functions</a> | <a href="#pro-methods">Protected Member Functions</a> | <a href="#pro-attribs">Protected Attributes</a> </div> <div class="headertitle"> <div class="title">DateFormat Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div> </div><!--header--> <div class="contents"> <p><a class="el" href="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a> is an abstract class for a family of classes that convert dates and times from their internal representations to textual form and back again in a language-independent manner. <a href="classDateFormat.html#details">More...</a></p> <p><code>#include <<a class="el" href="datefmt_8h_source.html">datefmt.h</a>></code></p> <div class="dynheader"> Inheritance diagram for DateFormat:</div> <div class="dyncontent"> <div class="center"> <img src="classDateFormat.png" usemap="#DateFormat_map" alt=""/> <map id="DateFormat_map" name="DateFormat_map"> <area href="classFormat.html" title="Base class for all formats. " alt="Format" shape="rect" coords="0,112,114,136"/> <area href="classUObject.html" title="UObject is the common ICU "boilerplate" class. " alt="UObject" shape="rect" coords="0,56,114,80"/> <area href="classUMemory.html" title="UMemory is the common ICU base class. " alt="UMemory" shape="rect" coords="0,0,114,24"/> <area href="classSimpleDateFormat.html" title="SimpleDateFormat is a concrete class for formatting and parsing dates in a language-independent manne..." alt="SimpleDateFormat" shape="rect" coords="0,224,114,248"/> </map> </div></div> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a> Public Types</h2></td></tr> <tr class="memitem:a960020b0c7ec1b66798022681473e04d"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a960020b0c7ec1b66798022681473e04d">EStyle</a> { <br/>   <b>kNone</b> = -1, <b>kFull</b> = 0, <b>kLong</b> = 1, <b>kMedium</b> = 2, <br/>   <b>kShort</b> = 3, <b>kDateOffset</b> = kShort + 1, <b>kDateTime</b> = 8, <b>kRelative</b> = (1 << 7), <br/>   <b>kFullRelative</b> = (kFull | kRelative), <b>kLongRelative</b> = kLong | kRelative, <b>kMediumRelative</b> = kMedium | kRelative, <b>kShortRelative</b> = kShort | kRelative, <br/>   <b>kDefault</b> = kMedium, <a class="el" href="classDateFormat.html#a960020b0c7ec1b66798022681473e04da61bcc8b716ce88570990bc538ab0e770">FULL</a> = kFull, <b>LONG</b> = kLong, <b>MEDIUM</b> = kMedium, <br/>   <b>SHORT</b> = kShort, <b>DEFAULT</b> = kDefault, <b>DATE_OFFSET</b> = kDateOffset, <b>NONE</b> = kNone, <br/>   <b>DATE_TIME</b> = kDateTime <br/> }</td></tr> <tr class="memdesc:a960020b0c7ec1b66798022681473e04d"><td class="mdescLeft"> </td><td class="mdescRight">Constants for various style patterns. <a href="classDateFormat.html#a960020b0c7ec1b66798022681473e04d">More...</a><br/></td></tr> <tr class="separator:a960020b0c7ec1b66798022681473e04d"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a2bdbb8f1ac253e350dded1bd4cc1105a"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a2bdbb8f1ac253e350dded1bd4cc1105a">EField</a> { <br/>   <b>kEraField</b> = UDAT_ERA_FIELD, <b>kYearField</b> = UDAT_YEAR_FIELD, <b>kMonthField</b> = UDAT_MONTH_FIELD, <b>kDateField</b> = UDAT_DATE_FIELD, <br/>   <b>kHourOfDay1Field</b> = UDAT_HOUR_OF_DAY1_FIELD, <b>kHourOfDay0Field</b> = UDAT_HOUR_OF_DAY0_FIELD, <b>kMinuteField</b> = UDAT_MINUTE_FIELD, <b>kSecondField</b> = UDAT_SECOND_FIELD, <br/>   <b>kMillisecondField</b> = UDAT_FRACTIONAL_SECOND_FIELD, <b>kDayOfWeekField</b> = UDAT_DAY_OF_WEEK_FIELD, <b>kDayOfYearField</b> = UDAT_DAY_OF_YEAR_FIELD, <b>kDayOfWeekInMonthField</b> = UDAT_DAY_OF_WEEK_IN_MONTH_FIELD, <br/>   <b>kWeekOfYearField</b> = UDAT_WEEK_OF_YEAR_FIELD, <b>kWeekOfMonthField</b> = UDAT_WEEK_OF_MONTH_FIELD, <b>kAmPmField</b> = UDAT_AM_PM_FIELD, <b>kHour1Field</b> = UDAT_HOUR1_FIELD, <br/>   <b>kHour0Field</b> = UDAT_HOUR0_FIELD, <b>kTimezoneField</b> = UDAT_TIMEZONE_FIELD, <b>kYearWOYField</b> = UDAT_YEAR_WOY_FIELD, <b>kDOWLocalField</b> = UDAT_DOW_LOCAL_FIELD, <br/>   <b>kExtendedYearField</b> = UDAT_EXTENDED_YEAR_FIELD, <b>kJulianDayField</b> = UDAT_JULIAN_DAY_FIELD, <b>kMillisecondsInDayField</b> = UDAT_MILLISECONDS_IN_DAY_FIELD, <b>ERA_FIELD</b> = UDAT_ERA_FIELD, <br/>   <b>YEAR_FIELD</b> = UDAT_YEAR_FIELD, <b>MONTH_FIELD</b> = UDAT_MONTH_FIELD, <b>DATE_FIELD</b> = UDAT_DATE_FIELD, <b>HOUR_OF_DAY1_FIELD</b> = UDAT_HOUR_OF_DAY1_FIELD, <br/>   <b>HOUR_OF_DAY0_FIELD</b> = UDAT_HOUR_OF_DAY0_FIELD, <b>MINUTE_FIELD</b> = UDAT_MINUTE_FIELD, <b>SECOND_FIELD</b> = UDAT_SECOND_FIELD, <b>MILLISECOND_FIELD</b> = UDAT_FRACTIONAL_SECOND_FIELD, <br/>   <b>DAY_OF_WEEK_FIELD</b> = UDAT_DAY_OF_WEEK_FIELD, <b>DAY_OF_YEAR_FIELD</b> = UDAT_DAY_OF_YEAR_FIELD, <b>DAY_OF_WEEK_IN_MONTH_FIELD</b> = UDAT_DAY_OF_WEEK_IN_MONTH_FIELD, <b>WEEK_OF_YEAR_FIELD</b> = UDAT_WEEK_OF_YEAR_FIELD, <br/>   <b>WEEK_OF_MONTH_FIELD</b> = UDAT_WEEK_OF_MONTH_FIELD, <b>AM_PM_FIELD</b> = UDAT_AM_PM_FIELD, <b>HOUR1_FIELD</b> = UDAT_HOUR1_FIELD, <b>HOUR0_FIELD</b> = UDAT_HOUR0_FIELD, <br/>   <b>TIMEZONE_FIELD</b> = UDAT_TIMEZONE_FIELD <br/> }</td></tr> <tr class="memdesc:a2bdbb8f1ac253e350dded1bd4cc1105a"><td class="mdescLeft"> </td><td class="mdescRight">Field selector for <a class="el" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted out...">FieldPosition</a> for <a class="el" href="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a> fields. <a href="classDateFormat.html#a2bdbb8f1ac253e350dded1bd4cc1105a">More...</a><br/></td></tr> <tr class="separator:a2bdbb8f1ac253e350dded1bd4cc1105a"><td class="memSeparator" colspan="2"> </td></tr> </table><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:a15ec30ed9553462c326b48d9ee2b9542"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a15ec30ed9553462c326b48d9ee2b9542">~DateFormat</a> ()</td></tr> <tr class="memdesc:a15ec30ed9553462c326b48d9ee2b9542"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#a15ec30ed9553462c326b48d9ee2b9542">More...</a><br/></td></tr> <tr class="separator:a15ec30ed9553462c326b48d9ee2b9542"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a4b11dc83bba269b4a5966b91f0dde5b5"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a4b11dc83bba269b4a5966b91f0dde5b5">operator==</a> (const <a class="el" href="classFormat.html">Format</a> &) const </td></tr> <tr class="memdesc:a4b11dc83bba269b4a5966b91f0dde5b5"><td class="mdescLeft"> </td><td class="mdescRight">Equality operator. <a href="#a4b11dc83bba269b4a5966b91f0dde5b5">More...</a><br/></td></tr> <tr class="separator:a4b11dc83bba269b4a5966b91f0dde5b5"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a75b3bbdb1b728fa9c8ddaa344915427d"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a75b3bbdb1b728fa9c8ddaa344915427d">format</a> (const <a class="el" href="classFormattable.html">Formattable</a> &obj, <a class="el" href="classUnicodeString.html">UnicodeString</a> &appendTo, <a class="el" href="classFieldPosition.html">FieldPosition</a> &pos, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const </td></tr> <tr class="memdesc:a75b3bbdb1b728fa9c8ddaa344915427d"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="classFormat.html" title="Base class for all formats. ">Format</a> an object to produce a string. <a href="#a75b3bbdb1b728fa9c8ddaa344915427d">More...</a><br/></td></tr> <tr class="separator:a75b3bbdb1b728fa9c8ddaa344915427d"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a6a43ee1f7a2db50e70675fe365e26bd5"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a6a43ee1f7a2db50e70675fe365e26bd5">format</a> (<a class="el" href="classCalendar.html">Calendar</a> &cal, <a class="el" href="classUnicodeString.html">UnicodeString</a> &appendTo, <a class="el" href="classFieldPosition.html">FieldPosition</a> &fieldPosition) const =0</td></tr> <tr class="memdesc:a6a43ee1f7a2db50e70675fe365e26bd5"><td class="mdescLeft"> </td><td class="mdescRight">Formats a date into a date/time string. <a href="#a6a43ee1f7a2db50e70675fe365e26bd5">More...</a><br/></td></tr> <tr class="separator:a6a43ee1f7a2db50e70675fe365e26bd5"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a8eef30d8294185a29bc755292219daf7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a8eef30d8294185a29bc755292219daf7">format</a> (<a class="el" href="utypes_8h.html#ace1704e9e77d407d1eaaa2e73ec0c039">UDate</a> date, <a class="el" href="classUnicodeString.html">UnicodeString</a> &appendTo, <a class="el" href="classFieldPosition.html">FieldPosition</a> &fieldPosition) const </td></tr> <tr class="memdesc:a8eef30d8294185a29bc755292219daf7"><td class="mdescLeft"> </td><td class="mdescRight">Formats a UDate into a date/time string. <a href="#a8eef30d8294185a29bc755292219daf7">More...</a><br/></td></tr> <tr class="separator:a8eef30d8294185a29bc755292219daf7"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a85657ecb3891e2f94b7aadcf0741528a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a85657ecb3891e2f94b7aadcf0741528a">format</a> (<a class="el" href="utypes_8h.html#ace1704e9e77d407d1eaaa2e73ec0c039">UDate</a> date, <a class="el" href="classUnicodeString.html">UnicodeString</a> &appendTo) const </td></tr> <tr class="memdesc:a85657ecb3891e2f94b7aadcf0741528a"><td class="mdescLeft"> </td><td class="mdescRight">Formats a UDate into a date/time string. <a href="#a85657ecb3891e2f94b7aadcf0741528a">More...</a><br/></td></tr> <tr class="separator:a85657ecb3891e2f94b7aadcf0741528a"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a5f83e587088badccff4ef25b4b8fcd78"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a5f83e587088badccff4ef25b4b8fcd78">format</a> (const <a class="el" href="classFormattable.html">Formattable</a> &obj, <a class="el" href="classUnicodeString.html">UnicodeString</a> &appendTo, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const </td></tr> <tr class="memdesc:a5f83e587088badccff4ef25b4b8fcd78"><td class="mdescLeft"> </td><td class="mdescRight">Redeclared <a class="el" href="classFormat.html" title="Base class for all formats. ">Format</a> method. <a href="#a5f83e587088badccff4ef25b4b8fcd78">More...</a><br/></td></tr> <tr class="separator:a5f83e587088badccff4ef25b4b8fcd78"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a9b9493fd564b7268f8e42921e4ac6822"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="utypes_8h.html#ace1704e9e77d407d1eaaa2e73ec0c039">UDate</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a9b9493fd564b7268f8e42921e4ac6822">parse</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &text, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const </td></tr> <tr class="memdesc:a9b9493fd564b7268f8e42921e4ac6822"><td class="mdescLeft"> </td><td class="mdescRight">Parse a date/time string. <a href="#a9b9493fd564b7268f8e42921e4ac6822">More...</a><br/></td></tr> <tr class="separator:a9b9493fd564b7268f8e42921e4ac6822"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a7b659b020ec1dc76c6cc1032b878289c"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a7b659b020ec1dc76c6cc1032b878289c">parse</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &text, <a class="el" href="classCalendar.html">Calendar</a> &cal, <a class="el" href="classParsePosition.html">ParsePosition</a> &pos) const =0</td></tr> <tr class="memdesc:a7b659b020ec1dc76c6cc1032b878289c"><td class="mdescLeft"> </td><td class="mdescRight">Parse a date/time string beginning at the given parse position. <a href="#a7b659b020ec1dc76c6cc1032b878289c">More...</a><br/></td></tr> <tr class="separator:a7b659b020ec1dc76c6cc1032b878289c"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a3b6df3a263da2d8e4ea72e79a1f61071"><td class="memItemLeft" align="right" valign="top"><a class="el" href="utypes_8h.html#ace1704e9e77d407d1eaaa2e73ec0c039">UDate</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a3b6df3a263da2d8e4ea72e79a1f61071">parse</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &text, <a class="el" href="classParsePosition.html">ParsePosition</a> &pos) const </td></tr> <tr class="memdesc:a3b6df3a263da2d8e4ea72e79a1f61071"><td class="mdescLeft"> </td><td class="mdescRight">Parse a date/time string beginning at the given parse position. <a href="#a3b6df3a263da2d8e4ea72e79a1f61071">More...</a><br/></td></tr> <tr class="separator:a3b6df3a263da2d8e4ea72e79a1f61071"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a37ffcef643dda5667e736ea715ee9a4d"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a37ffcef643dda5667e736ea715ee9a4d">parseObject</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &source, <a class="el" href="classFormattable.html">Formattable</a> &result, <a class="el" href="classParsePosition.html">ParsePosition</a> &parse_pos) const </td></tr> <tr class="memdesc:a37ffcef643dda5667e736ea715ee9a4d"><td class="mdescLeft"> </td><td class="mdescRight">Parse a string to produce an object. <a href="#a37ffcef643dda5667e736ea715ee9a4d">More...</a><br/></td></tr> <tr class="separator:a37ffcef643dda5667e736ea715ee9a4d"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a8baf20a26e3c8bd68085c95be83d2aa9"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a8baf20a26e3c8bd68085c95be83d2aa9">isLenient</a> (<a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a>) const </td></tr> <tr class="memdesc:a8baf20a26e3c8bd68085c95be83d2aa9"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the formatter is set for lenient parsing. <a href="#a8baf20a26e3c8bd68085c95be83d2aa9">More...</a><br/></td></tr> <tr class="separator:a8baf20a26e3c8bd68085c95be83d2aa9"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a6b0da8c6169b80f5adafc9099ed29b11"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a6b0da8c6169b80f5adafc9099ed29b11">setLenient</a> (<a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> lenient)</td></tr> <tr class="memdesc:a6b0da8c6169b80f5adafc9099ed29b11"><td class="mdescLeft"> </td><td class="mdescRight">Specify whether or not date/time parsing is to be lenient. <a href="#a6b0da8c6169b80f5adafc9099ed29b11">More...</a><br/></td></tr> <tr class="separator:a6b0da8c6169b80f5adafc9099ed29b11"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a2709a585c8ef4397d5c392c5e8962dc9"><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="classCalendar.html">Calendar</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a2709a585c8ef4397d5c392c5e8962dc9">getCalendar</a> (<a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a>) const </td></tr> <tr class="memdesc:a2709a585c8ef4397d5c392c5e8962dc9"><td class="mdescLeft"> </td><td class="mdescRight">Gets the calendar associated with this date/time formatter. <a href="#a2709a585c8ef4397d5c392c5e8962dc9">More...</a><br/></td></tr> <tr class="separator:a2709a585c8ef4397d5c392c5e8962dc9"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a82d9d571d5764024766bb3750759bb4b"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a82d9d571d5764024766bb3750759bb4b">adoptCalendar</a> (<a class="el" href="classCalendar.html">Calendar</a> *calendarToAdopt)</td></tr> <tr class="memdesc:a82d9d571d5764024766bb3750759bb4b"><td class="mdescLeft"> </td><td class="mdescRight">Set the calendar to be used by this date format. <a href="#a82d9d571d5764024766bb3750759bb4b">More...</a><br/></td></tr> <tr class="separator:a82d9d571d5764024766bb3750759bb4b"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a630055ba1fe47d7ff32616dd2b18fe7d"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a630055ba1fe47d7ff32616dd2b18fe7d">setCalendar</a> (const <a class="el" href="classCalendar.html">Calendar</a> &newCalendar)</td></tr> <tr class="memdesc:a630055ba1fe47d7ff32616dd2b18fe7d"><td class="mdescLeft"> </td><td class="mdescRight">Set the calendar to be used by this date format. <a href="#a630055ba1fe47d7ff32616dd2b18fe7d">More...</a><br/></td></tr> <tr class="separator:a630055ba1fe47d7ff32616dd2b18fe7d"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aec908179e2acbfbf3b15a7e056dc5938"><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="classNumberFormat.html">NumberFormat</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#aec908179e2acbfbf3b15a7e056dc5938">getNumberFormat</a> (<a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a>) const </td></tr> <tr class="memdesc:aec908179e2acbfbf3b15a7e056dc5938"><td class="mdescLeft"> </td><td class="mdescRight">Gets the number formatter which this date/time formatter uses to format and parse the numeric portions of the pattern. <a href="#aec908179e2acbfbf3b15a7e056dc5938">More...</a><br/></td></tr> <tr class="separator:aec908179e2acbfbf3b15a7e056dc5938"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a647d861ff2b5a8099a014c1f5bf422bf"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a647d861ff2b5a8099a014c1f5bf422bf">adoptNumberFormat</a> (<a class="el" href="classNumberFormat.html">NumberFormat</a> *formatToAdopt)</td></tr> <tr class="memdesc:a647d861ff2b5a8099a014c1f5bf422bf"><td class="mdescLeft"> </td><td class="mdescRight">Allows you to set the number formatter. <a href="#a647d861ff2b5a8099a014c1f5bf422bf">More...</a><br/></td></tr> <tr class="separator:a647d861ff2b5a8099a014c1f5bf422bf"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ac8231aff2cf3d7abe75a6ee18756c67f"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#ac8231aff2cf3d7abe75a6ee18756c67f">setNumberFormat</a> (const <a class="el" href="classNumberFormat.html">NumberFormat</a> &newNumberFormat)</td></tr> <tr class="memdesc:ac8231aff2cf3d7abe75a6ee18756c67f"><td class="mdescLeft"> </td><td class="mdescRight">Allows you to set the number formatter. <a href="#ac8231aff2cf3d7abe75a6ee18756c67f">More...</a><br/></td></tr> <tr class="separator:ac8231aff2cf3d7abe75a6ee18756c67f"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a08e6d3b2da81e396953220b0a8f26a15"><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="classTimeZone.html">TimeZone</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a08e6d3b2da81e396953220b0a8f26a15">getTimeZone</a> (<a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a>) const </td></tr> <tr class="memdesc:a08e6d3b2da81e396953220b0a8f26a15"><td class="mdescLeft"> </td><td class="mdescRight">Returns a reference to the <a class="el" href="classTimeZone.html" title="TimeZone represents a time zone offset, and also figures out daylight savings. ">TimeZone</a> used by this <a class="el" href="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a>'s calendar. <a href="#a08e6d3b2da81e396953220b0a8f26a15">More...</a><br/></td></tr> <tr class="separator:a08e6d3b2da81e396953220b0a8f26a15"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a8158b0bad37c50bfe9f66e6ca2b0a604"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a8158b0bad37c50bfe9f66e6ca2b0a604">adoptTimeZone</a> (<a class="el" href="classTimeZone.html">TimeZone</a> *zoneToAdopt)</td></tr> <tr class="memdesc:a8158b0bad37c50bfe9f66e6ca2b0a604"><td class="mdescLeft"> </td><td class="mdescRight">Sets the time zone for the calendar of this <a class="el" href="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a> object. <a href="#a8158b0bad37c50bfe9f66e6ca2b0a604">More...</a><br/></td></tr> <tr class="separator:a8158b0bad37c50bfe9f66e6ca2b0a604"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a3671f7110383b5b0062f5cfbbd22b122"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a3671f7110383b5b0062f5cfbbd22b122">setTimeZone</a> (const <a class="el" href="classTimeZone.html">TimeZone</a> &zone)</td></tr> <tr class="memdesc:a3671f7110383b5b0062f5cfbbd22b122"><td class="mdescLeft"> </td><td class="mdescRight">Sets the time zone for the calendar of this <a class="el" href="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a> object. <a href="#a3671f7110383b5b0062f5cfbbd22b122">More...</a><br/></td></tr> <tr class="separator:a3671f7110383b5b0062f5cfbbd22b122"><td class="memSeparator" colspan="2"> </td></tr> <tr class="inherit_header pub_methods_classFormat"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classFormat')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classFormat.html">Format</a></td></tr> <tr class="memitem:aafee703f14d0f5ddb264b708a75174a8 inherit pub_methods_classFormat"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#aafee703f14d0f5ddb264b708a75174a8">~Format</a> ()</td></tr> <tr class="memdesc:aafee703f14d0f5ddb264b708a75174a8 inherit pub_methods_classFormat"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#aafee703f14d0f5ddb264b708a75174a8">More...</a><br/></td></tr> <tr class="separator:aafee703f14d0f5ddb264b708a75174a8 inherit pub_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a4f65d87226814931dde8b035f47b69f3 inherit pub_methods_classFormat"><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="classFormat.html#a4f65d87226814931dde8b035f47b69f3">operator!=</a> (const <a class="el" href="classFormat.html">Format</a> &other) const </td></tr> <tr class="memdesc:a4f65d87226814931dde8b035f47b69f3 inherit pub_methods_classFormat"><td class="mdescLeft"> </td><td class="mdescRight">Return true if the given <a class="el" href="classFormat.html" title="Base class for all formats. ">Format</a> objects are not semantically equal. <a href="#a4f65d87226814931dde8b035f47b69f3">More...</a><br/></td></tr> <tr class="separator:a4f65d87226814931dde8b035f47b69f3 inherit pub_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a4e7ebd5cfd390c35e2bda88257f8b51a inherit pub_methods_classFormat"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classFormat.html">Format</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#a4e7ebd5cfd390c35e2bda88257f8b51a">clone</a> () const =0</td></tr> <tr class="memdesc:a4e7ebd5cfd390c35e2bda88257f8b51a inherit pub_methods_classFormat"><td class="mdescLeft"> </td><td class="mdescRight">Clone this object polymorphically. <a href="#a4e7ebd5cfd390c35e2bda88257f8b51a">More...</a><br/></td></tr> <tr class="separator:a4e7ebd5cfd390c35e2bda88257f8b51a inherit pub_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:af3f0b157f07d6e9f908da69c99239600 inherit pub_methods_classFormat"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#af3f0b157f07d6e9f908da69c99239600">format</a> (const <a class="el" href="classFormattable.html">Formattable</a> &obj, <a class="el" href="classUnicodeString.html">UnicodeString</a> &appendTo, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const </td></tr> <tr class="memdesc:af3f0b157f07d6e9f908da69c99239600 inherit pub_methods_classFormat"><td class="mdescLeft"> </td><td class="mdescRight">Formats an object to produce a string. <a href="#af3f0b157f07d6e9f908da69c99239600">More...</a><br/></td></tr> <tr class="separator:af3f0b157f07d6e9f908da69c99239600 inherit pub_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a90da11177ef906f464d63ca14300e1c9 inherit pub_methods_classFormat"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#a90da11177ef906f464d63ca14300e1c9">parseObject</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &source, <a class="el" href="classFormattable.html">Formattable</a> &result, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const </td></tr> <tr class="memdesc:a90da11177ef906f464d63ca14300e1c9 inherit pub_methods_classFormat"><td class="mdescLeft"> </td><td class="mdescRight">Parses a string to produce an object. <a href="#a90da11177ef906f464d63ca14300e1c9">More...</a><br/></td></tr> <tr class="separator:a90da11177ef906f464d63ca14300e1c9 inherit pub_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ac961d410d174518e5a3ebb8bbef45cd7 inherit pub_methods_classFormat"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#ac961d410d174518e5a3ebb8bbef45cd7">getDynamicClassID</a> () const =0</td></tr> <tr class="memdesc:ac961d410d174518e5a3ebb8bbef45cd7 inherit pub_methods_classFormat"><td class="mdescLeft"> </td><td class="mdescRight">Returns a unique class ID POLYMORPHICALLY. <a href="#ac961d410d174518e5a3ebb8bbef45cd7">More...</a><br/></td></tr> <tr class="separator:ac961d410d174518e5a3ebb8bbef45cd7 inherit pub_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a4502b04fe77be54f9f0343a87156fbd5 inherit pub_methods_classFormat"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classLocale.html">Locale</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#a4502b04fe77be54f9f0343a87156fbd5">getLocale</a> (<a class="el" href="uloc_8h.html#adf053345d343f8d82ae080f7a5871f34">ULocDataLocaleType</a> type, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const </td></tr> <tr class="memdesc:a4502b04fe77be54f9f0343a87156fbd5 inherit pub_methods_classFormat"><td class="mdescLeft"> </td><td class="mdescRight">Get the locale for this format object. <a href="#a4502b04fe77be54f9f0343a87156fbd5">More...</a><br/></td></tr> <tr class="separator:a4502b04fe77be54f9f0343a87156fbd5 inherit pub_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ad8ca4e4cbd2a11b4de3c748c48c7c536 inherit pub_methods_classFormat"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#ad8ca4e4cbd2a11b4de3c748c48c7c536">getLocaleID</a> (<a class="el" href="uloc_8h.html#adf053345d343f8d82ae080f7a5871f34">ULocDataLocaleType</a> type, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const </td></tr> <tr class="memdesc:ad8ca4e4cbd2a11b4de3c748c48c7c536 inherit pub_methods_classFormat"><td class="mdescLeft"> </td><td class="mdescRight">Get the locale for this format object. <a href="#ad8ca4e4cbd2a11b4de3c748c48c7c536">More...</a><br/></td></tr> <tr class="separator:ad8ca4e4cbd2a11b4de3c748c48c7c536 inherit pub_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> <tr class="inherit_header pub_methods_classUObject"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classUObject')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classUObject.html">UObject</a></td></tr> <tr class="memitem:ace22cf29a90641ef43350deae5bedb85 inherit pub_methods_classUObject"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classUObject.html#ace22cf29a90641ef43350deae5bedb85">~UObject</a> ()</td></tr> <tr class="memdesc:ace22cf29a90641ef43350deae5bedb85 inherit pub_methods_classUObject"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#ace22cf29a90641ef43350deae5bedb85">More...</a><br/></td></tr> <tr class="separator:ace22cf29a90641ef43350deae5bedb85 inherit pub_methods_classUObject"><td class="memSeparator" colspan="2"> </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:a1542fb2dd41dcf16f50b797c9d0d57ed"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classDateFormat.html">DateFormat</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a1542fb2dd41dcf16f50b797c9d0d57ed">createInstance</a> (<a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a>)</td></tr> <tr class="memdesc:a1542fb2dd41dcf16f50b797c9d0d57ed"><td class="mdescLeft"> </td><td class="mdescRight">Create a default date/time formatter that uses the SHORT style for both the date and the time. <a href="#a1542fb2dd41dcf16f50b797c9d0d57ed">More...</a><br/></td></tr> <tr class="separator:a1542fb2dd41dcf16f50b797c9d0d57ed"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a06bc4b1f19af713f49a8003ce7be15e1"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classDateFormat.html">DateFormat</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a06bc4b1f19af713f49a8003ce7be15e1">createPatternInstance</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &skeleton, const <a class="el" href="classLocale.html">Locale</a> &locale, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status)</td></tr> <tr class="memdesc:a06bc4b1f19af713f49a8003ce7be15e1"><td class="mdescLeft"> </td><td class="mdescRight">This is for ICU internal use only. <a href="#a06bc4b1f19af713f49a8003ce7be15e1">More...</a><br/></td></tr> <tr class="separator:a06bc4b1f19af713f49a8003ce7be15e1"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:abfd5a63e39e890a2ff07a5b15ec88a42"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classDateFormat.html">DateFormat</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#abfd5a63e39e890a2ff07a5b15ec88a42">createTimeInstance</a> (<a class="el" href="classDateFormat.html#a960020b0c7ec1b66798022681473e04d">EStyle</a> style=kDefault, const <a class="el" href="classLocale.html">Locale</a> &aLocale=<a class="el" href="classLocale.html#ac12d6326f2d283f5643f6b6caacfe88c">Locale::getDefault</a>())</td></tr> <tr class="memdesc:abfd5a63e39e890a2ff07a5b15ec88a42"><td class="mdescLeft"> </td><td class="mdescRight">Creates a time formatter with the given formatting style for the given locale. <a href="#abfd5a63e39e890a2ff07a5b15ec88a42">More...</a><br/></td></tr> <tr class="separator:abfd5a63e39e890a2ff07a5b15ec88a42"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a4421ca0c8b71b078f3ab9433f5413380"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classDateFormat.html">DateFormat</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a4421ca0c8b71b078f3ab9433f5413380">createDateInstance</a> (<a class="el" href="classDateFormat.html#a960020b0c7ec1b66798022681473e04d">EStyle</a> style=kDefault, const <a class="el" href="classLocale.html">Locale</a> &aLocale=<a class="el" href="classLocale.html#ac12d6326f2d283f5643f6b6caacfe88c">Locale::getDefault</a>())</td></tr> <tr class="memdesc:a4421ca0c8b71b078f3ab9433f5413380"><td class="mdescLeft"> </td><td class="mdescRight">Creates a date formatter with the given formatting style for the given const locale. <a href="#a4421ca0c8b71b078f3ab9433f5413380">More...</a><br/></td></tr> <tr class="separator:a4421ca0c8b71b078f3ab9433f5413380"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a62fa8d2242bc72e5737131925f478453"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classDateFormat.html">DateFormat</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a62fa8d2242bc72e5737131925f478453">createDateTimeInstance</a> (<a class="el" href="classDateFormat.html#a960020b0c7ec1b66798022681473e04d">EStyle</a> dateStyle=kDefault, <a class="el" href="classDateFormat.html#a960020b0c7ec1b66798022681473e04d">EStyle</a> timeStyle=kDefault, const <a class="el" href="classLocale.html">Locale</a> &aLocale=<a class="el" href="classLocale.html#ac12d6326f2d283f5643f6b6caacfe88c">Locale::getDefault</a>())</td></tr> <tr class="memdesc:a62fa8d2242bc72e5737131925f478453"><td class="mdescLeft"> </td><td class="mdescRight">Creates a date/time formatter with the given formatting styles for the given locale. <a href="#a62fa8d2242bc72e5737131925f478453">More...</a><br/></td></tr> <tr class="separator:a62fa8d2242bc72e5737131925f478453"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a5934ceffff9eafdd3edeb466a2a619e1"><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="classLocale.html">Locale</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a5934ceffff9eafdd3edeb466a2a619e1">getAvailableLocales</a> (int32_t &count)</td></tr> <tr class="memdesc:a5934ceffff9eafdd3edeb466a2a619e1"><td class="mdescLeft"> </td><td class="mdescRight">Gets the set of locales for which DateFormats are installed. <a href="#a5934ceffff9eafdd3edeb466a2a619e1">More...</a><br/></td></tr> <tr class="separator:a5934ceffff9eafdd3edeb466a2a619e1"><td class="memSeparator" colspan="2"> </td></tr> <tr class="inherit_header pub_static_methods_classUMemory"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classUMemory')"><img src="closed.png" alt="-"/> Static Public Member Functions inherited from <a class="el" href="classUMemory.html">UMemory</a></td></tr> <tr class="memitem:a309b19b5777e2840b85b202aef5a54fb inherit pub_static_methods_classUMemory"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classUMemory.html#a309b19b5777e2840b85b202aef5a54fb">operator new</a> (size_t size)</td></tr> <tr class="memdesc:a309b19b5777e2840b85b202aef5a54fb inherit pub_static_methods_classUMemory"><td class="mdescLeft"> </td><td class="mdescRight">Override for ICU4C C++ memory management. <a href="#a309b19b5777e2840b85b202aef5a54fb">More...</a><br/></td></tr> <tr class="separator:a309b19b5777e2840b85b202aef5a54fb inherit pub_static_methods_classUMemory"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a4d0df3571728e7b8a823dbbea6e9b5c5 inherit pub_static_methods_classUMemory"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classUMemory.html#a4d0df3571728e7b8a823dbbea6e9b5c5">operator new[]</a> (size_t size)</td></tr> <tr class="memdesc:a4d0df3571728e7b8a823dbbea6e9b5c5 inherit pub_static_methods_classUMemory"><td class="mdescLeft"> </td><td class="mdescRight">Override for ICU4C C++ memory management. <a href="#a4d0df3571728e7b8a823dbbea6e9b5c5">More...</a><br/></td></tr> <tr class="separator:a4d0df3571728e7b8a823dbbea6e9b5c5 inherit pub_static_methods_classUMemory"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:adcda65a58813749f8f45c5e6c1ed37e1 inherit pub_static_methods_classUMemory"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classUMemory.html#adcda65a58813749f8f45c5e6c1ed37e1">operator delete</a> (<a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> *p)</td></tr> <tr class="memdesc:adcda65a58813749f8f45c5e6c1ed37e1 inherit pub_static_methods_classUMemory"><td class="mdescLeft"> </td><td class="mdescRight">Override for ICU4C C++ memory management. <a href="#adcda65a58813749f8f45c5e6c1ed37e1">More...</a><br/></td></tr> <tr class="separator:adcda65a58813749f8f45c5e6c1ed37e1 inherit pub_static_methods_classUMemory"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a7602a7a8c6fdff21d9fbecea4d899333 inherit pub_static_methods_classUMemory"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classUMemory.html#a7602a7a8c6fdff21d9fbecea4d899333">operator delete[]</a> (<a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> *p)</td></tr> <tr class="memdesc:a7602a7a8c6fdff21d9fbecea4d899333 inherit pub_static_methods_classUMemory"><td class="mdescLeft"> </td><td class="mdescRight">Override for ICU4C C++ memory management. <a href="#a7602a7a8c6fdff21d9fbecea4d899333">More...</a><br/></td></tr> <tr class="separator:a7602a7a8c6fdff21d9fbecea4d899333 inherit pub_static_methods_classUMemory"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a43b5221fe429f77230b2040f8724c154 inherit pub_static_methods_classUMemory"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classUMemory.html#a43b5221fe429f77230b2040f8724c154">operator new</a> (size_t, <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> *ptr)</td></tr> <tr class="memdesc:a43b5221fe429f77230b2040f8724c154 inherit pub_static_methods_classUMemory"><td class="mdescLeft"> </td><td class="mdescRight">Override for ICU4C C++ memory management for STL. <a href="#a43b5221fe429f77230b2040f8724c154">More...</a><br/></td></tr> <tr class="separator:a43b5221fe429f77230b2040f8724c154 inherit pub_static_methods_classUMemory"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a9b746b0cdb49c8f8907773002ea5c4ea inherit pub_static_methods_classUMemory"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classUMemory.html#a9b746b0cdb49c8f8907773002ea5c4ea">operator delete</a> (<a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> *, <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> *)</td></tr> <tr class="memdesc:a9b746b0cdb49c8f8907773002ea5c4ea inherit pub_static_methods_classUMemory"><td class="mdescLeft"> </td><td class="mdescRight">Override for ICU4C C++ memory management for STL. <a href="#a9b746b0cdb49c8f8907773002ea5c4ea">More...</a><br/></td></tr> <tr class="separator:a9b746b0cdb49c8f8907773002ea5c4ea inherit pub_static_methods_classUMemory"><td class="memSeparator" colspan="2"> </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:a5d5c353fee433a94c298643a40886642"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a5d5c353fee433a94c298643a40886642">DateFormat</a> ()</td></tr> <tr class="memdesc:a5d5c353fee433a94c298643a40886642"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="#a5d5c353fee433a94c298643a40886642">More...</a><br/></td></tr> <tr class="separator:a5d5c353fee433a94c298643a40886642"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab370602cca07d66a02607e2a0a9f12e6"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#ab370602cca07d66a02607e2a0a9f12e6">DateFormat</a> (const <a class="el" href="classDateFormat.html">DateFormat</a> &)</td></tr> <tr class="memdesc:ab370602cca07d66a02607e2a0a9f12e6"><td class="mdescLeft"> </td><td class="mdescRight">Copy constructor. <a href="#ab370602cca07d66a02607e2a0a9f12e6">More...</a><br/></td></tr> <tr class="separator:ab370602cca07d66a02607e2a0a9f12e6"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:acc1631f81d9ce43f827a88a92e9e3b6a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classDateFormat.html">DateFormat</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#acc1631f81d9ce43f827a88a92e9e3b6a">operator=</a> (const <a class="el" href="classDateFormat.html">DateFormat</a> &)</td></tr> <tr class="memdesc:acc1631f81d9ce43f827a88a92e9e3b6a"><td class="mdescLeft"> </td><td class="mdescRight">Default assignment operator. <a href="#acc1631f81d9ce43f827a88a92e9e3b6a">More...</a><br/></td></tr> <tr class="separator:acc1631f81d9ce43f827a88a92e9e3b6a"><td class="memSeparator" colspan="2"> </td></tr> <tr class="inherit_header pro_methods_classFormat"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classFormat')"><img src="closed.png" alt="-"/> Protected Member Functions inherited from <a class="el" href="classFormat.html">Format</a></td></tr> <tr class="memitem:ae15f405ad3805e8d6691354047b500ca inherit pro_methods_classFormat"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#ae15f405ad3805e8d6691354047b500ca">setLocaleIDs</a> (const char *valid, const char *actual)</td></tr> <tr class="separator:ae15f405ad3805e8d6691354047b500ca inherit pro_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a9326a787208f39b9544fc6fcbcbfcad3 inherit pro_methods_classFormat"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#a9326a787208f39b9544fc6fcbcbfcad3">Format</a> ()</td></tr> <tr class="memdesc:a9326a787208f39b9544fc6fcbcbfcad3 inherit pro_methods_classFormat"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor for subclass use only. <a href="#a9326a787208f39b9544fc6fcbcbfcad3">More...</a><br/></td></tr> <tr class="separator:a9326a787208f39b9544fc6fcbcbfcad3 inherit pro_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab69111c370cfe44f9508e78e5431cc65 inherit pro_methods_classFormat"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#ab69111c370cfe44f9508e78e5431cc65">Format</a> (const <a class="el" href="classFormat.html">Format</a> &)</td></tr> <tr class="separator:ab69111c370cfe44f9508e78e5431cc65 inherit pro_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a7a5276a88c488462eea3a508b71f4d9c inherit pro_methods_classFormat"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classFormat.html">Format</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#a7a5276a88c488462eea3a508b71f4d9c">operator=</a> (const <a class="el" href="classFormat.html">Format</a> &)</td></tr> <tr class="separator:a7a5276a88c488462eea3a508b71f4d9c inherit pro_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a> Protected Attributes</h2></td></tr> <tr class="memitem:a1c6089b62ba441c5ece52fd7650b3403"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCalendar.html">Calendar</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a1c6089b62ba441c5ece52fd7650b3403">fCalendar</a></td></tr> <tr class="memdesc:a1c6089b62ba441c5ece52fd7650b3403"><td class="mdescLeft"> </td><td class="mdescRight">The calendar that <a class="el" href="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a> uses to produce the time field values needed to implement date/time formatting. <a href="#a1c6089b62ba441c5ece52fd7650b3403">More...</a><br/></td></tr> <tr class="separator:a1c6089b62ba441c5ece52fd7650b3403"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a418c15b2f4b0717fb40b2a189e230ad4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classNumberFormat.html">NumberFormat</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classDateFormat.html#a418c15b2f4b0717fb40b2a189e230ad4">fNumberFormat</a></td></tr> <tr class="memdesc:a418c15b2f4b0717fb40b2a189e230ad4"><td class="mdescLeft"> </td><td class="mdescRight">The number formatter that <a class="el" href="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a> uses to format numbers in dates and times. <a href="#a418c15b2f4b0717fb40b2a189e230ad4">More...</a><br/></td></tr> <tr class="separator:a418c15b2f4b0717fb40b2a189e230ad4"><td class="memSeparator" colspan="2"> </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_classFormat"><td colspan="2" onclick="javascript:toggleInherit('pro_static_methods_classFormat')"><img src="closed.png" alt="-"/> Static Protected Member Functions inherited from <a class="el" href="classFormat.html">Format</a></td></tr> <tr class="memitem:a98213ada53770537d242f4bf0ba43b73 inherit pro_static_methods_classFormat"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#a98213ada53770537d242f4bf0ba43b73">syntaxError</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &pattern, int32_t pos, <a class="el" href="structUParseError.html">UParseError</a> &parseError)</td></tr> <tr class="memdesc:a98213ada53770537d242f4bf0ba43b73 inherit pro_static_methods_classFormat"><td class="mdescLeft"> </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="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a>. <a href="#a98213ada53770537d242f4bf0ba43b73">More...</a><br/></td></tr> <tr class="separator:a98213ada53770537d242f4bf0ba43b73 inherit pro_static_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p><a class="el" href="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a> is an abstract class for a family of classes that convert dates and times from their internal representations to textual form and back again in a language-independent manner. </p> <p>Converting from the internal representation (milliseconds since midnight, January 1, 1970) to text is known as "formatting," and converting from text to millis is known as "parsing." We currently define only one concrete subclass of <a class="el" href="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a>: <a class="el" href="classSimpleDateFormat.html" title="SimpleDateFormat is a concrete class for formatting and parsing dates in a language-independent manne...">SimpleDateFormat</a>, which can handle pretty much all normal date formatting and parsing actions. </p> <p><a class="el" href="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a> helps you to format and parse dates for any locale. Your code can be completely independent of the locale conventions for months, days of the week, or even the calendar format: lunar vs. solar. </p> <p>To format a date for the current <a class="el" href="classLocale.html" title="A Locale object represents a specific geographical, political, or cultural region. ">Locale</a>, use one of the static factory methods: </p> <pre> <div class="fragment"><div class="line">* <a class="code" href="classDateFormat.html">DateFormat</a>* dfmt = <a class="code" href="classDateFormat.html#a4421ca0c8b71b078f3ab9433f5413380">DateFormat::createDateInstance</a>();</div> <div class="line">* <a class="code" href="utypes_8h.html#ace1704e9e77d407d1eaaa2e73ec0c039">UDate</a> myDate = <a class="code" href="classCalendar.html#aab1712ccf7b261332a4d14c71dc6994e">Calendar::getNow</a>();</div> <div class="line">* <a class="code" href="classUnicodeString.html">UnicodeString</a> myString;</div> <div class="line">* myString = dfmt-><a class="code" href="classDateFormat.html#a75b3bbdb1b728fa9c8ddaa344915427d">format</a>( myDate, myString );</div> <div class="line">* </div> </div><!-- fragment --> </pre><p> If you are formatting multiple numbers, it is more efficient to get the format and use it multiple times so that the system doesn't have to fetch the information about the local language and country conventions multiple times. </p> <pre> <div class="fragment"><div class="line">* <a class="code" href="classDateFormat.html">DateFormat</a>* df = <a class="code" href="classDateFormat.html#a4421ca0c8b71b078f3ab9433f5413380">DateFormat::createDateInstance</a>();</div> <div class="line">* <a class="code" href="classUnicodeString.html">UnicodeString</a> myString;</div> <div class="line">* <a class="code" href="utypes_8h.html#ace1704e9e77d407d1eaaa2e73ec0c039">UDate</a> myDateArr[] = { 0.0, 100000000.0, 2000000000.0 }; <span class="comment">// test values</span></div> <div class="line">* <span class="keywordflow">for</span> (int32_t i = 0; i < 3; ++i) {</div> <div class="line">* myString.<a class="code" href="classUnicodeString.html#aee0fec9568ee616e330627bf371eda8d">remove</a>();</div> <div class="line">* cout << df-><a class="code" href="classDateFormat.html#a75b3bbdb1b728fa9c8ddaa344915427d">format</a>( myDateArr[i], myString ) << endl;</div> <div class="line">* }</div> <div class="line">* </div> </div><!-- fragment --> </pre><p> To get specific fields of a date, you can use <a class="el" href="structUFieldPosition.html" title="A struct representing a range of text containing a specific field. ">UFieldPosition</a> to get specific fields. </p> <pre> <div class="fragment"><div class="line">* <a class="code" href="classDateFormat.html">DateFormat</a>* dfmt = <a class="code" href="classDateFormat.html#a4421ca0c8b71b078f3ab9433f5413380">DateFormat::createDateInstance</a>();</div> <div class="line">* <a class="code" href="classFieldPosition.html">FieldPosition</a> pos(DateFormat::YEAR_FIELD);</div> <div class="line">* <a class="code" href="classUnicodeString.html">UnicodeString</a> myString;</div> <div class="line">* myString = dfmt-><a class="code" href="classDateFormat.html#a75b3bbdb1b728fa9c8ddaa344915427d">format</a>( myDate, myString );</div> <div class="line">* cout << myString << endl;</div> <div class="line">* cout << pos.getBeginIndex() << <span class="stringliteral">","</span> << pos. getEndIndex() << endl;</div> <div class="line">* </div> </div><!-- fragment --> </pre><p> To format a date for a different <a class="el" href="classLocale.html" title="A Locale object represents a specific geographical, political, or cultural region. ">Locale</a>, specify it in the call to <a class="el" href="classDateFormat.html#a4421ca0c8b71b078f3ab9433f5413380" title="Creates a date formatter with the given formatting style for the given const locale. ">createDateInstance()</a>. </p> <pre> <div class="fragment"><div class="line">* <a class="code" href="classDateFormat.html">DateFormat</a>* df =</div> <div class="line">* <a class="code" href="classDateFormat.html#a4421ca0c8b71b078f3ab9433f5413380">DateFormat::createDateInstance</a>( DateFormat::SHORT, <a class="code" href="classLocale.html#aa19e5f0ac81c6c7fd9c13d7515608ebd">Locale::getFrance</a>());</div> <div class="line">* </div> </div><!-- fragment --> </pre><p> You can use a <a class="el" href="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a> to parse also. </p> <pre> <div class="fragment"><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="utypes_8h.html#ace1704e9e77d407d1eaaa2e73ec0c039">UDate</a> myDate = df-><a class="code" href="classDateFormat.html#a9b9493fd564b7268f8e42921e4ac6822">parse</a>(myString, status);</div> <div class="line">* </div> </div><!-- fragment --> </pre><p> Use <a class="el" href="classDateFormat.html#a4421ca0c8b71b078f3ab9433f5413380" title="Creates a date formatter with the given formatting style for the given const locale. ">createDateInstance()</a> to produce the normal date format for that country. There are other static factory methods available. Use <a class="el" href="classDateFormat.html#abfd5a63e39e890a2ff07a5b15ec88a42" title="Creates a time formatter with the given formatting style for the given locale. ">createTimeInstance()</a> to produce the normal time format for that country. Use <a class="el" href="classDateFormat.html#a62fa8d2242bc72e5737131925f478453" title="Creates a date/time formatter with the given formatting styles for the given locale. ">createDateTimeInstance()</a> to produce a <a class="el" href="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a> that formats both date and time. You can pass in different options to these factory methods to control the length of the result; from SHORT to MEDIUM to LONG to FULL. The exact result depends on the locale, but generally: </p> <ul type="round"> <li> SHORT is completely numeric, such as 12/13/52 or 3:30pm </li> <li> MEDIUM is longer, such as Jan 12, 1952 </li> <li> LONG is longer, such as January 12, 1952 or 3:30:32pm </li> <li> FULL is pretty completely specified, such as Tuesday, April 12, 1952 AD or 3:30:42pm PST. </li> </ul> <p>You can also set the time zone on the format if you wish. If you want even more control over the format or parsing, (or want to give your users more control), you can try casting the <a class="el" href="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a> you get from the factory methods to a <a class="el" href="classSimpleDateFormat.html" title="SimpleDateFormat is a concrete class for formatting and parsing dates in a language-independent manne...">SimpleDateFormat</a>. This will work for the majority of countries; just remember to chck <a class="el" href="classFormat.html#ac961d410d174518e5a3ebb8bbef45cd7" title="Returns a unique class ID POLYMORPHICALLY. ">getDynamicClassID()</a> before carrying out the cast. </p> <p>You can also use forms of the parse and format methods with <a class="el" href="classParsePosition.html" title="ParsePosition is a simple class used by Format and its subclasses to keep track of the current positi...">ParsePosition</a> and <a class="el" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted out...">FieldPosition</a> to allow you to </p> <ul type="round"> <li> Progressively parse through pieces of a string. </li> <li> Align any particular field, or find out where it is for selection on the screen. </li> </ul> <p><em>User subclasses are not supported.</em> While clients may write subclasses, such code will not necessarily work and will not be guaranteed to work stably from release to release. </p> <p>Definition at line <a class="el" href="datefmt_8h_source.html#l00137">137</a> of file <a class="el" href="datefmt_8h_source.html">datefmt.h</a>.</p> </div><h2 class="groupheader">Member Enumeration Documentation</h2> <a class="anchor" id="a2bdbb8f1ac253e350dded1bd4cc1105a"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">enum <a class="el" href="classDateFormat.html#a2bdbb8f1ac253e350dded1bd4cc1105a">DateFormat::EField</a></td> </tr> </table> </div><div class="memdoc"> <p>Field selector for <a class="el" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted out...">FieldPosition</a> for <a class="el" href="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a> fields. </p> <dl class="obsolete"><dt><b><a class="el" href="obsolete.html#_obsolete000001">Obsolete:</a></b></dt><dd>ICU 3.4 use UDateFormatField instead, since this API will be removed in that release </dd></dl> <p>Definition at line <a class="el" href="datefmt_8h_source.html#l00640">640</a> of file <a class="el" href="datefmt_8h_source.html">datefmt.h</a>.</p> </div> </div> <a class="anchor" id="a960020b0c7ec1b66798022681473e04d"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">enum <a class="el" href="classDateFormat.html#a960020b0c7ec1b66798022681473e04d">DateFormat::EStyle</a></td> </tr> </table> </div><div class="memdoc"> <p>Constants for various style patterns. </p> <p>These reflect the order of items in the DateTimePatterns resource. There are 4 time patterns, 4 date patterns, and then the date-time pattern. Each block of 4 values in the resource occurs in the order full, long, medium, short. </p> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002230">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl> <table class="fieldtable"> <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="a960020b0c7ec1b66798022681473e04da61bcc8b716ce88570990bc538ab0e770"></a>FULL</em> </td><td class="fielddoc"> <p>These constants are provided for backwards compatibility only. </p> <p>Please use the C++ style constants defined above. </p> </td></tr> </table> <p>Definition at line <a class="el" href="datefmt_8h_source.html#l00147">147</a> of file <a class="el" href="datefmt_8h_source.html">datefmt.h</a>.</p> </div> </div> <h2 class="groupheader">Constructor & Destructor Documentation</h2> <a class="anchor" id="a15ec30ed9553462c326b48d9ee2b9542"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual DateFormat::~DateFormat </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#_stable002231">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a5d5c353fee433a94c298643a40886642"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">DateFormat::DateFormat </td> <td>(</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>Default constructor. </p> <p>Creates a <a class="el" href="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a> with no <a class="el" href="classCalendar.html" title="Calendar is an abstract base class for converting between a UDate object and a set of integer fields ...">Calendar</a> or <a class="el" href="classNumberFormat.html" title="Abstract base class for all number formats. ">NumberFormat</a> associated with it. This constructor depends on the subclasses to fill in the calendar and numberFormat fields. </p> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002258">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="ab370602cca07d66a02607e2a0a9f12e6"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">DateFormat::DateFormat </td> <td>(</td> <td class="paramtype">const <a class="el" href="classDateFormat.html">DateFormat</a> & </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#_stable002259">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <h2 class="groupheader">Member Function Documentation</h2> <a class="anchor" id="a82d9d571d5764024766bb3750759bb4b"></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="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> DateFormat::adoptCalendar </td> <td>(</td> <td class="paramtype"><a class="el" href="classCalendar.html">Calendar</a> * </td> <td class="paramname"><em>calendarToAdopt</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>Set the calendar to be used by this date format. </p> <p>Initially, the default calendar for the specified or default locale is used. The caller should not delete the <a class="el" href="classCalendar.html" title="Calendar is an abstract base class for converting between a UDate object and a set of integer fields ...">Calendar</a> object after it is adopted by this call. Adopting a new calendar will change to the default symbols.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">calendarToAdopt</td><td><a class="el" href="classCalendar.html" title="Calendar is an abstract base class for converting between a UDate object and a set of integer fields ...">Calendar</a> object to be adopted. </td></tr> </table> </dd> </dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002250">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Reimplemented in <a class="el" href="classSimpleDateFormat.html#a66975f632ef7ce796eeaad1e0e6b33b5">SimpleDateFormat</a>.</p> </div> </div> <a class="anchor" id="a647d861ff2b5a8099a014c1f5bf422bf"></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="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> DateFormat::adoptNumberFormat </td> <td>(</td> <td class="paramtype"><a class="el" href="classNumberFormat.html">NumberFormat</a> * </td> <td class="paramname"><em>formatToAdopt</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>Allows you to set the number formatter. </p> <p>The caller should not delete the <a class="el" href="classNumberFormat.html" title="Abstract base class for all number formats. ">NumberFormat</a> object after it is adopted by this call. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">formatToAdopt</td><td><a class="el" href="classNumberFormat.html" title="Abstract base class for all number formats. ">NumberFormat</a> object to be adopted. </td></tr> </table> </dd> </dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002253">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a8158b0bad37c50bfe9f66e6ca2b0a604"></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="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> DateFormat::adoptTimeZone </td> <td>(</td> <td class="paramtype"><a class="el" href="classTimeZone.html">TimeZone</a> * </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 of this <a class="el" href="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a> object. </p> <p>The caller no longer owns the <a class="el" href="classTimeZone.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="classTimeZone.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#_stable002256">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a4421ca0c8b71b078f3ab9433f5413380"></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="classDateFormat.html">DateFormat</a>* DateFormat::createDateInstance </td> <td>(</td> <td class="paramtype"><a class="el" href="classDateFormat.html#a960020b0c7ec1b66798022681473e04d">EStyle</a> </td> <td class="paramname"><em>style</em> = <code>kDefault</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> & </td> <td class="paramname"><em>aLocale</em> = <code><a class="el" href="classLocale.html#ac12d6326f2d283f5643f6b6caacfe88c">Locale::getDefault</a>()</code> </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>Creates a date formatter with the given formatting style for the given const locale. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">style</td><td>The given formatting style. For example, SHORT for "M/d/yy" in the US locale. </td></tr> <tr><td class="paramname">aLocale</td><td>The given locale. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>A date formatter which the caller owns. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002244">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a62fa8d2242bc72e5737131925f478453"></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="classDateFormat.html">DateFormat</a>* DateFormat::createDateTimeInstance </td> <td>(</td> <td class="paramtype"><a class="el" href="classDateFormat.html#a960020b0c7ec1b66798022681473e04d">EStyle</a> </td> <td class="paramname"><em>dateStyle</em> = <code>kDefault</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classDateFormat.html#a960020b0c7ec1b66798022681473e04d">EStyle</a> </td> <td class="paramname"><em>timeStyle</em> = <code>kDefault</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> & </td> <td class="paramname"><em>aLocale</em> = <code><a class="el" href="classLocale.html#ac12d6326f2d283f5643f6b6caacfe88c">Locale::getDefault</a>()</code> </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>Creates a date/time formatter with the given formatting styles for the given locale. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">dateStyle</td><td>The given formatting style for the date portion of the result. For example, SHORT for "M/d/yy" in the US locale. </td></tr> <tr><td class="paramname">timeStyle</td><td>The given formatting style for the time portion of the result. For example, SHORT for "h:mm a" in the US locale. </td></tr> <tr><td class="paramname">aLocale</td><td>The given locale. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>A date/time formatter which the caller owns. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002245">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a1542fb2dd41dcf16f50b797c9d0d57ed"></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="classDateFormat.html">DateFormat</a>* DateFormat::createInstance </td> <td>(</td> <td class="paramtype"><a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </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>Create a default date/time formatter that uses the SHORT style for both the date and the time. </p> <dl class="section return"><dt>Returns</dt><dd>A date/time formatter which the caller owns. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002242">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a06bc4b1f19af713f49a8003ce7be15e1"></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="classDateFormat.html">DateFormat</a>* DateFormat::createPatternInstance </td> <td>(</td> <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> & </td> <td class="paramname"><em>skeleton</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> & </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> & </td> <td class="paramname"><em>status</em> </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>This is for ICU internal use only. </p> <p>Please do not use. Create a date/time formatter from skeleton and a given locale.</p> <p>Users are encouraged to use the skeleton macros defined in <a class="el" href="udat_8h.html" title="C API: DateFormat. ">udat.h</a>. For example, MONTH_WEEKDAY_DAY, which is "MMMMEEEEd", and which means the pattern should have day, month, and day-of-week fields, and follow the long date format defined in date time pattern. For example, for English, the full pattern should be "EEEE, MMMM d".</p> <p>Temporarily, this is an internal API, used by DateIntevalFormat only. There will be a new set of APIs for the same purpose coming soon. After which, this API will be replaced.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">skeleton</td><td>the skeleton on which date format based. </td></tr> <tr><td class="paramname">locale</td><td>the given locale. </td></tr> <tr><td class="paramname">status</td><td>Output param to be set to success/failure code. If it is failure, the returned date formatter will be NULL. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>a simple date formatter which the caller owns. </dd></dl> <dl class="internal"><dt><b><a class="el" href="internal.html#_internal000184">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. ICU 4.0 </dd></dl> </div> </div> <a class="anchor" id="abfd5a63e39e890a2ff07a5b15ec88a42"></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="classDateFormat.html">DateFormat</a>* DateFormat::createTimeInstance </td> <td>(</td> <td class="paramtype"><a class="el" href="classDateFormat.html#a960020b0c7ec1b66798022681473e04d">EStyle</a> </td> <td class="paramname"><em>style</em> = <code>kDefault</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> & </td> <td class="paramname"><em>aLocale</em> = <code><a class="el" href="classLocale.html#ac12d6326f2d283f5643f6b6caacfe88c">Locale::getDefault</a>()</code> </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>Creates a time formatter with the given formatting style for the given locale. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">style</td><td>The given formatting style. For example, SHORT for "h:mm a" in the US locale. </td></tr> <tr><td class="paramname">aLocale</td><td>The given locale. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>A time formatter which the caller owns. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002243">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a75b3bbdb1b728fa9c8ddaa344915427d"></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="classUnicodeString.html">UnicodeString</a>& DateFormat::format </td> <td>(</td> <td class="paramtype">const <a class="el" href="classFormattable.html">Formattable</a> & </td> <td class="paramname"><em>obj</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> & </td> <td class="paramname"><em>appendTo</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classFieldPosition.html">FieldPosition</a> & </td> <td class="paramname"><em>pos</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><a class="el" href="classFormat.html" title="Base class for all formats. ">Format</a> an object to produce a string. </p> <p>This method handles <a class="el" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting. ">Formattable</a> objects with a UDate type. If a the <a class="el" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting. ">Formattable</a> object type is not a Date, 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 Date. </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">pos</td><td>On input: an alignment field, if desired. On output: the offsets of the alignment field. </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#_stable002233">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Implements <a class="el" href="classFormat.html#a12ffb857c5c9a553270dfe9a71fbd8e9">Format</a>.</p> <p>Reimplemented in <a class="el" href="classSimpleDateFormat.html#acacf4307ca25a05fdb4672ea50f69bce">SimpleDateFormat</a>.</p> <p>Referenced by <a class="el" href="smpdtfmt_8h_source.html#l00932">SimpleDateFormat::format()</a>.</p> </div> </div> <a class="anchor" id="a6a43ee1f7a2db50e70675fe365e26bd5"></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="classUnicodeString.html">UnicodeString</a>& DateFormat::format </td> <td>(</td> <td class="paramtype"><a class="el" href="classCalendar.html">Calendar</a> & </td> <td class="paramname"><em>cal</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> & </td> <td class="paramname"><em>appendTo</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classFieldPosition.html">FieldPosition</a> & </td> <td class="paramname"><em>fieldPosition</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">pure virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Formats a date into a date/time string. </p> <p>This is an abstract method which concrete subclasses must implement. </p> <p>On input, the <a class="el" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted out...">FieldPosition</a> parameter may have its "field" member filled with an enum value specifying a field. On output, the <a class="el" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted out...">FieldPosition</a> will be filled in with the text offsets for that field. </p> <p>For example, given a time text "1996.07.10 AD at 15:08:56 PDT", if the given fieldPosition.field is UDAT_YEAR_FIELD, the offsets fieldPosition.beginIndex and statfieldPositionus.getEndIndex will be set to 0 and 4, respectively. </p> <p>Notice that if the same time field appears more than once in a pattern, the status will be set for the first occurence of that time field. For instance, formatting a UDate to the time string "1 PM PDT (Pacific Daylight Time)" using the pattern "h a z (zzzz)" and the alignment field DateFormat::TIMEZONE_FIELD, the offsets fieldPosition.beginIndex and fieldPosition.getEndIndex will be set to 5 and 8, respectively, for the first occurence of the timezone pattern character 'z'.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">cal</td><td><a class="el" href="classCalendar.html" title="Calendar is an abstract base class for converting between a UDate object and a set of integer fields ...">Calendar</a> set to the date and time to be formatted into a date/time 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 (see examples above) On output: the offsets of the alignment field (see examples above) </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#_stable002234">Stable:</a></b></dt><dd>ICU 2.1 </dd></dl> <p>Implemented in <a class="el" href="classSimpleDateFormat.html#a618b8ffd208cb29851d12d1db5babc49">SimpleDateFormat</a>.</p> </div> </div> <a class="anchor" id="a8eef30d8294185a29bc755292219daf7"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a>& DateFormat::format </td> <td>(</td> <td class="paramtype"><a class="el" href="utypes_8h.html#ace1704e9e77d407d1eaaa2e73ec0c039">UDate</a> </td> <td class="paramname"><em>date</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> & </td> <td class="paramname"><em>appendTo</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classFieldPosition.html">FieldPosition</a> & </td> <td class="paramname"><em>fieldPosition</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td> const</td> </tr> </table> </div><div class="memdoc"> <p>Formats a UDate into a date/time string. </p> <p>On input, the <a class="el" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted out...">FieldPosition</a> parameter may have its "field" member filled with an enum value specifying a field. On output, the <a class="el" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted out...">FieldPosition</a> will be filled in with the text offsets for that field. </p> <p>For example, given a time text "1996.07.10 AD at 15:08:56 PDT", if the given fieldPosition.field is UDAT_YEAR_FIELD, the offsets fieldPosition.beginIndex and statfieldPositionus.getEndIndex will be set to 0 and 4, respectively. </p> <p>Notice that if the same time field appears more than once in a pattern, the status will be set for the first occurence of that time field. For instance, formatting a UDate to the time string "1 PM PDT (Pacific Daylight Time)" using the pattern "h a z (zzzz)" and the alignment field DateFormat::TIMEZONE_FIELD, the offsets fieldPosition.beginIndex and fieldPosition.getEndIndex will be set to 5 and 8, respectively, for the first occurence of the timezone pattern character 'z'.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">date</td><td>UDate to be formatted into a date/time 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 (see examples above) On output: the offsets of the alignment field (see examples above) </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#_stable002235">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a85657ecb3891e2f94b7aadcf0741528a"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a>& DateFormat::format </td> <td>(</td> <td class="paramtype"><a class="el" href="utypes_8h.html#ace1704e9e77d407d1eaaa2e73ec0c039">UDate</a> </td> <td class="paramname"><em>date</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> & </td> <td class="paramname"><em>appendTo</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td> const</td> </tr> </table> </div><div class="memdoc"> <p>Formats a UDate into a date/time string. </p> <p>If there is a problem, you won't know, using this method. Use the overloaded <a class="el" href="classDateFormat.html#a75b3bbdb1b728fa9c8ddaa344915427d" title="Format an object to produce a string. ">format()</a> method which takes a <a class="el" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted out...">FieldPosition</a>& to detect formatting problems.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">date</td><td>The UDate value to be formatted into a string. </td></tr> <tr><td class="paramname">appendTo</td><td>Output parameter to receive result. Result is appended to existing contents. </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#_stable002236">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a5f83e587088badccff4ef25b4b8fcd78"></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="classUnicodeString.html">UnicodeString</a> & DateFormat::format </td> <td>(</td> <td class="paramtype">const <a class="el" href="classFormattable.html">Formattable</a> & </td> <td class="paramname"><em>obj</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> & </td> <td class="paramname"><em>appendTo</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">inline</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Redeclared <a class="el" href="classFormat.html" title="Base class for all formats. ">Format</a> method. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">obj</td><td>The object to be formatted into a 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">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#_stable002237">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Definition at line <a class="el" href="datefmt_8h_source.html#l00690">690</a> of file <a class="el" href="datefmt_8h_source.html">datefmt.h</a>.</p> <p>References <a class="el" href="classFormat.html#af3f0b157f07d6e9f908da69c99239600">Format::format()</a>.</p> </div> </div> <a class="anchor" id="a5934ceffff9eafdd3edeb466a2a619e1"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static const <a class="el" href="classLocale.html">Locale</a>* DateFormat::getAvailableLocales </td> <td>(</td> <td class="paramtype">int32_t & </td> <td class="paramname"><em>count</em></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>Gets the set of locales for which DateFormats are installed. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">count</td><td>Filled in with the number of locales in the list that is returned. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>the set of locales for which DateFormats are installed. The caller does NOT own this list and must not delete it. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002246">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a2709a585c8ef4397d5c392c5e8962dc9"></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="classCalendar.html">Calendar</a>* DateFormat::getCalendar </td> <td>(</td> <td class="paramtype"><a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </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>Gets the calendar associated with this date/time formatter. </p> <dl class="section return"><dt>Returns</dt><dd>the calendar associated with this date/time formatter. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002249">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="aec908179e2acbfbf3b15a7e056dc5938"></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="classNumberFormat.html">NumberFormat</a>* DateFormat::getNumberFormat </td> <td>(</td> <td class="paramtype"><a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </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>Gets the number formatter which this date/time formatter uses to format and parse the numeric portions of the pattern. </p> <dl class="section return"><dt>Returns</dt><dd>the number formatter which this date/time formatter uses. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002252">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a08e6d3b2da81e396953220b0a8f26a15"></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="classTimeZone.html">TimeZone</a>& DateFormat::getTimeZone </td> <td>(</td> <td class="paramtype"><a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </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="classTimeZone.html" title="TimeZone represents a time zone offset, and also figures out daylight savings. ">TimeZone</a> used by this <a class="el" href="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a>'s calendar. </p> <dl class="section return"><dt>Returns</dt><dd>the time zone associated with the calendar of <a class="el" href="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a>. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002255">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a8baf20a26e3c8bd68085c95be83d2aa9"></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> DateFormat::isLenient </td> <td>(</td> <td class="paramtype"><a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </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 true if the formatter is set for lenient parsing. </p> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002247">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="acc1631f81d9ce43f827a88a92e9e3b6a"></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="classDateFormat.html">DateFormat</a>& DateFormat::operator= </td> <td>(</td> <td class="paramtype">const <a class="el" href="classDateFormat.html">DateFormat</a> & </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>Default assignment operator. </p> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002260">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a4b11dc83bba269b4a5966b91f0dde5b5"></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> DateFormat::operator== </td> <td>(</td> <td class="paramtype">const <a class="el" href="classFormat.html">Format</a> & </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>Equality operator. </p> <p>Returns true if the two formats have the same behavior. </p> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002232">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Implements <a class="el" href="classFormat.html#ad9be7e8b7bef97013ff74ef1be3903a5">Format</a>.</p> <p>Reimplemented in <a class="el" href="classSimpleDateFormat.html#a349ffdf4204e4a6b0fec2c473ceaacb3">SimpleDateFormat</a>.</p> </div> </div> <a class="anchor" id="a9b9493fd564b7268f8e42921e4ac6822"></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="utypes_8h.html#ace1704e9e77d407d1eaaa2e73ec0c039">UDate</a> DateFormat::parse </td> <td>(</td> <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> & </td> <td class="paramname"><em>text</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>Parse a date/time string. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">text</td><td>The string to be parsed into a UDate value. </td></tr> <tr><td class="paramname">status</td><td>Output param to be set to success/failure code. If 'text' cannot be parsed, it will be set to a failure code. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The parsed UDate value, if successful. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002238">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Reimplemented in <a class="el" href="classSimpleDateFormat.html#ad824c9ccee2a56fb54c2384989bb80f7">SimpleDateFormat</a>.</p> </div> </div> <a class="anchor" id="a7b659b020ec1dc76c6cc1032b878289c"></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="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> DateFormat::parse </td> <td>(</td> <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> & </td> <td class="paramname"><em>text</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCalendar.html">Calendar</a> & </td> <td class="paramname"><em>cal</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classParsePosition.html">ParsePosition</a> & </td> <td class="paramname"><em>pos</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">pure virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Parse a date/time string beginning at the given parse position. </p> <p>For example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Date that is equivalent to Date(837039928046). </p> <p>By default, parsing is lenient: If the input is not in the form used by this object's format method but can still be parsed as a date, then the parse succeeds. Clients may insist on strict adherence to the format by calling setLenient(false).</p> <dl class="section see"><dt>See Also</dt><dd>DateFormat::setLenient(boolean)</dd></dl> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">text</td><td>The date/time string to be parsed </td></tr> <tr><td class="paramname">cal</td><td>a <a class="el" href="classCalendar.html" title="Calendar is an abstract base class for converting between a UDate object and a set of integer fields ...">Calendar</a> set to the date and time to be formatted into a date/time string. </td></tr> <tr><td class="paramname">pos</td><td>On input, the position at which to start parsing; on output, the position at which parsing terminated, or the start position if the parse failed. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>A valid UDate if the input could be parsed. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002239">Stable:</a></b></dt><dd>ICU 2.1 </dd></dl> <p>Implemented in <a class="el" href="classSimpleDateFormat.html#a3d26207eb58fd0afc0c41f58e5caf56f">SimpleDateFormat</a>.</p> </div> </div> <a class="anchor" id="a3b6df3a263da2d8e4ea72e79a1f61071"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="utypes_8h.html#ace1704e9e77d407d1eaaa2e73ec0c039">UDate</a> DateFormat::parse </td> <td>(</td> <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> & </td> <td class="paramname"><em>text</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classParsePosition.html">ParsePosition</a> & </td> <td class="paramname"><em>pos</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td> const</td> </tr> </table> </div><div class="memdoc"> <p>Parse a date/time string beginning at the given parse position. </p> <p>For example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Date that is equivalent to Date(837039928046). </p> <p>By default, parsing is lenient: If the input is not in the form used by this object's format method but can still be parsed as a date, then the parse succeeds. Clients may insist on strict adherence to the format by calling setLenient(false).</p> <dl class="section see"><dt>See Also</dt><dd>DateFormat::setLenient(boolean)</dd></dl> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">text</td><td>The date/time string to be parsed </td></tr> <tr><td class="paramname">pos</td><td>On input, the position at which to start parsing; on output, the position at which parsing terminated, or the start position if the parse failed. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>A valid UDate if the input could be parsed. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002240">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a37ffcef643dda5667e736ea715ee9a4d"></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="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> DateFormat::parseObject </td> <td>(</td> <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> & </td> <td class="paramname"><em>source</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classFormattable.html">Formattable</a> & </td> <td class="paramname"><em>result</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classParsePosition.html">ParsePosition</a> & </td> <td class="paramname"><em>parse_pos</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>Parse a string to produce an object. </p> <p>This methods handles parsing of date/time strings into <a class="el" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting. ">Formattable</a> objects with UDate types. </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="classFormat.html#aa53bea97b986c2f21e5638aa30aa08b7" 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="classFormattable.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. Upon return this param is set to the position after the last character successfully parsed. If the source is not parsed successfully, this param will remain 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="stable"><dt><b><a class="el" href="stable.html#_stable002241">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Implements <a class="el" href="classFormat.html#aa53bea97b986c2f21e5638aa30aa08b7">Format</a>.</p> </div> </div> <a class="anchor" id="a630055ba1fe47d7ff32616dd2b18fe7d"></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="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> DateFormat::setCalendar </td> <td>(</td> <td class="paramtype">const <a class="el" href="classCalendar.html">Calendar</a> & </td> <td class="paramname"><em>newCalendar</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>Set the calendar to be used by this date format. </p> <p>Initially, the default calendar for the specified or default locale is used.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">newCalendar</td><td><a class="el" href="classCalendar.html" title="Calendar is an abstract base class for converting between a UDate object and a set of integer fields ...">Calendar</a> object to be set. </td></tr> </table> </dd> </dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002251">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a6b0da8c6169b80f5adafc9099ed29b11"></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="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> DateFormat::setLenient </td> <td>(</td> <td class="paramtype"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> </td> <td class="paramname"><em>lenient</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>Specify whether or not date/time parsing is to be lenient. </p> <p>With lenient parsing, the parser may use heuristics to interpret inputs that do not precisely match this object's format. With strict parsing, inputs must match this object's format.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">lenient</td><td>True specifies date/time interpretation to be lenient. </td></tr> </table> </dd> </dl> <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classCalendar.html#a7d4084cd44bc04497309e01c161f45ee" title="Specifies whether or not date/time interpretation is to be lenient. ">Calendar::setLenient</a> </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002248">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="ac8231aff2cf3d7abe75a6ee18756c67f"></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="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> DateFormat::setNumberFormat </td> <td>(</td> <td class="paramtype">const <a class="el" href="classNumberFormat.html">NumberFormat</a> & </td> <td class="paramname"><em>newNumberFormat</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>Allows you to set the number formatter. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">newNumberFormat</td><td><a class="el" href="classNumberFormat.html" title="Abstract base class for all number formats. ">NumberFormat</a> object to be set. </td></tr> </table> </dd> </dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002254">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a3671f7110383b5b0062f5cfbbd22b122"></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="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> DateFormat::setTimeZone </td> <td>(</td> <td class="paramtype">const <a class="el" href="classTimeZone.html">TimeZone</a> & </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 of this <a class="el" href="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</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#_stable002257">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <h2 class="groupheader">Field Documentation</h2> <a class="anchor" id="a1c6089b62ba441c5ece52fd7650b3403"></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="classCalendar.html">Calendar</a>* DateFormat::fCalendar</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>The calendar that <a class="el" href="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a> uses to produce the time field values needed to implement date/time formatting. </p> <p>Subclasses should generally initialize this to the default calendar for the locale associated with this <a class="el" href="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a>. </p> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002261">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl> <p>Definition at line <a class="el" href="datefmt_8h_source.html#l00613">613</a> of file <a class="el" href="datefmt_8h_source.html">datefmt.h</a>.</p> </div> </div> <a class="anchor" id="a418c15b2f4b0717fb40b2a189e230ad4"></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="classNumberFormat.html">NumberFormat</a>* DateFormat::fNumberFormat</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>The number formatter that <a class="el" href="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a> uses to format numbers in dates and times. </p> <p>Subclasses should generally initialize this to the default number format for the locale associated with this <a class="el" href="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a>. </p> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002262">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl> <p>Definition at line <a class="el" href="datefmt_8h_source.html#l00621">621</a> of file <a class="el" href="datefmt_8h_source.html">datefmt.h</a>.</p> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="datefmt_8h_source.html">datefmt.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.5 </small></address> </body> </html>