]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/unicode/datefmt.h
ICU-66108.tar.gz
[apple/icu.git] / icuSources / i18n / unicode / datefmt.h
index 50e47b092ddef5425ec5e057dfe104c63a2f1d89..f106e821a762ae021a0d296238e5c887dcfb4f5f 100644 (file)
@@ -23,6 +23,8 @@
 
 #include "unicode/utypes.h"
 
+#if U_SHOW_CPLUSPLUS_API
+
 #if !UCONFIG_NO_FORMATTING
 
 #include "unicode/udat.h"
@@ -38,7 +40,6 @@
  * \brief C++ API: Abstract class for converting dates.
  */
 
-#if U_SHOW_CPLUSPLUS_API
 U_NAMESPACE_BEGIN
 
 class TimeZone;
@@ -222,6 +223,14 @@ public:
      */
     virtual ~DateFormat();
 
+    /**
+     * Clones this object polymorphically.
+     * The caller owns the result and should delete it when done.
+     * @return clone, or nullptr if an error occurred
+     * @stable ICU 2.0
+     */
+    virtual DateFormat* clone() const = 0;
+
     /**
      * Equality operator.  Returns true if the two formats have the same behavior.
      * @stable ICU 2.0
@@ -951,9 +960,10 @@ public:
 };
 
 U_NAMESPACE_END
-#endif // U_SHOW_CPLUSPLUS_API
 
 #endif /* #if !UCONFIG_NO_FORMATTING */
 
+#endif /* U_SHOW_CPLUSPLUS_API */
+
 #endif // _DATEFMT
 //eof