@swiftbrowser/wasm-sdk-foundation 0.0.0-stage → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (368) hide show
  1. package/LICENSE.txt +1445 -0
  2. package/README.md +24 -2
  3. package/files.json +366 -0
  4. package/package.json +18 -4
  5. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/HTMLparser.h +320 -0
  6. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/HTMLtree.h +147 -0
  7. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/SAX.h +204 -0
  8. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/SAX2.h +173 -0
  9. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/c14n.h +128 -0
  10. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/catalog.h +182 -0
  11. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/chvalid.h +230 -0
  12. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/debugXML.h +217 -0
  13. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/dict.h +81 -0
  14. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/encoding.h +233 -0
  15. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/entities.h +151 -0
  16. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/globals.h +529 -0
  17. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/hash.h +236 -0
  18. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/list.h +137 -0
  19. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/nanoftp.h +186 -0
  20. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/nanohttp.h +81 -0
  21. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/parser.h +1265 -0
  22. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/parserInternals.h +662 -0
  23. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/pattern.h +100 -0
  24. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/relaxng.h +218 -0
  25. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/schemasInternals.h +958 -0
  26. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/schematron.h +142 -0
  27. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/threads.h +94 -0
  28. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/tree.h +1314 -0
  29. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/uri.h +94 -0
  30. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/valid.h +448 -0
  31. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xinclude.h +129 -0
  32. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xlink.h +189 -0
  33. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlIO.h +369 -0
  34. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlautomata.h +146 -0
  35. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlerror.h +919 -0
  36. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlexports.h +50 -0
  37. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlmemory.h +228 -0
  38. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlmodule.h +57 -0
  39. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlreader.h +428 -0
  40. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlregexp.h +222 -0
  41. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlsave.h +88 -0
  42. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlschemas.h +246 -0
  43. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlschemastypes.h +152 -0
  44. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlstring.h +140 -0
  45. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlunicode.h +202 -0
  46. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlversion.h +526 -0
  47. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlwriter.h +488 -0
  48. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xpath.h +575 -0
  49. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xpathInternals.h +632 -0
  50. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xpointer.h +137 -0
  51. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFArray.h +673 -0
  52. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFAttributedString.h +157 -0
  53. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFAttributedStringPriv.h +25 -0
  54. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFAvailability.h +236 -0
  55. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBag.h +97 -0
  56. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBase.h +702 -0
  57. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBigNumber.h +76 -0
  58. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBinaryHeap.h +294 -0
  59. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBitVector.h +49 -0
  60. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBundle.h +349 -0
  61. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBundlePriv.h +334 -0
  62. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBundle_BinaryTypes.h +61 -0
  63. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBurstTrie.h +181 -0
  64. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFByteOrder.h +305 -0
  65. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFCalendar.h +116 -0
  66. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFCalendarPriv.h +52 -0
  67. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFCharacterSet.h +387 -0
  68. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFCharacterSetPriv.h +78 -0
  69. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFConstantKeys.h +128 -0
  70. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFData.h +79 -0
  71. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFDate.h +113 -0
  72. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFDateComponents.h +92 -0
  73. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFDateFormatter.h +193 -0
  74. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFDateFormatter_Private.h +31 -0
  75. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFDateInterval.h +62 -0
  76. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFDateIntervalFormatter.h +96 -0
  77. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFDictionary.h +674 -0
  78. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFError.h +183 -0
  79. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFError_Private.h +27 -0
  80. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFKnownLocations.h +42 -0
  81. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFListFormatter.h +32 -0
  82. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFLocale.h +204 -0
  83. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFLocale_Private.h +35 -0
  84. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFLocking.h +124 -0
  85. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFLogUtilities.h +52 -0
  86. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFMachPort.h +53 -0
  87. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFMessagePort.h +66 -0
  88. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFNotificationCenter.h +81 -0
  89. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFNumber.h +129 -0
  90. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFNumberFormatter.h +174 -0
  91. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFNumber_Private.h +30 -0
  92. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFOverflow.h +88 -0
  93. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFPlugIn.h +124 -0
  94. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFPlugInCOM.h +117 -0
  95. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFPreferences.h +130 -0
  96. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFPriv.h +721 -0
  97. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFPropertyList.h +151 -0
  98. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFPropertyList_Private.h +19 -0
  99. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFRegularExpression.h +68 -0
  100. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFRelativeDateTimeFormatter.h +61 -0
  101. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFRunArray.h +57 -0
  102. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFRunLoop.h +203 -0
  103. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFRuntime.h +281 -0
  104. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFSet.h +491 -0
  105. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFSocket.h +220 -0
  106. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStorage.h +296 -0
  107. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStream.h +505 -0
  108. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStreamAbstract.h +181 -0
  109. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStreamPriv.h +126 -0
  110. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFString.h +915 -0
  111. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStringDefaultEncoding.h +45 -0
  112. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStringEncodingConverter.h +82 -0
  113. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStringEncodingConverterExt.h +121 -0
  114. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStringEncodingConverterPriv.h +47 -0
  115. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStringEncodingDatabase.h +23 -0
  116. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStringEncodingExt.h +184 -0
  117. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFString_Private.h +32 -0
  118. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFTargetConditionals.h +284 -0
  119. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFTimeZone.h +98 -0
  120. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFTree.h +330 -0
  121. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFURL.h +1256 -0
  122. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFURLAccess.h +128 -0
  123. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFURLComponents.h +123 -0
  124. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFURLPriv.h +879 -0
  125. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFUUID.h +78 -0
  126. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFUniChar.h +244 -0
  127. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFUnicodeDecomposition.h +35 -0
  128. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFUnicodePrecomposition.h +23 -0
  129. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFUserNotification.h +185 -0
  130. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFUtilities.h +27 -0
  131. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CoreFoundation.h +105 -0
  132. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/ForFoundationOnly.h +816 -0
  133. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/ForSwiftFoundationOnly.h +689 -0
  134. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/module.modulemap +8 -0
  135. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/static-module.map +7 -0
  136. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/CFUniCharBitmapData.h +17 -0
  137. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/CFUniCharBitmapData.inc.h +14707 -0
  138. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/CFUniCharBitmapDataAccess.h +16 -0
  139. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/_CShimsMacros.h +24 -0
  140. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/_CShimsTargetConditionals.h +56 -0
  141. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/_CStdlib.h +169 -0
  142. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/_FoundationCShims.h +32 -0
  143. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/bplist_shims.h +19 -0
  144. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/filemanager_shims.h +156 -0
  145. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/io_shims.h +89 -0
  146. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/module.modulemap +5 -0
  147. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/platform_shims.h +112 -0
  148. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/string_shims.h +52 -0
  149. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/uuid.h +81 -0
  150. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/alphaindex.h +766 -0
  151. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/appendable.h +239 -0
  152. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/basictz.h +248 -0
  153. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/brkiter.h +694 -0
  154. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/bytestream.h +307 -0
  155. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/bytestrie.h +568 -0
  156. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/bytestriebuilder.h +193 -0
  157. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/calendar.h +2609 -0
  158. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/caniter.h +215 -0
  159. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/casemap.h +497 -0
  160. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/char16ptr.h +384 -0
  161. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/chariter.h +734 -0
  162. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/choicfmt.h +601 -0
  163. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/coleitr.h +411 -0
  164. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/coll.h +1387 -0
  165. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/compactdecimalformat.h +196 -0
  166. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/curramt.h +133 -0
  167. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/currpinf.h +274 -0
  168. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/currunit.h +146 -0
  169. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/datefmt.h +968 -0
  170. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dbbi.h +48 -0
  171. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dcfmtsym.h +636 -0
  172. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/decimfmt.h +2233 -0
  173. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/displayoptions.h +270 -0
  174. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/docmain.h +247 -0
  175. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dtfmtsym.h +1055 -0
  176. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dtintrv.h +163 -0
  177. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dtitvfmt.h +1231 -0
  178. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dtitvinf.h +524 -0
  179. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dtptngen.h +676 -0
  180. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dtrule.h +256 -0
  181. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/edits.h +531 -0
  182. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/enumset.h +69 -0
  183. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/errorcode.h +144 -0
  184. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/fieldpos.h +298 -0
  185. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/filteredbrk.h +152 -0
  186. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/fmtable.h +758 -0
  187. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/format.h +316 -0
  188. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/formattednumber.h +215 -0
  189. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/formattedvalue.h +318 -0
  190. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/fpositer.h +124 -0
  191. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/gender.h +122 -0
  192. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/gregocal.h +737 -0
  193. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/icudataver.h +43 -0
  194. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/icuplug.h +391 -0
  195. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/idna.h +333 -0
  196. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/listformatter.h +291 -0
  197. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/localebuilder.h +309 -0
  198. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/localematcher.h +710 -0
  199. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/localpointer.h +609 -0
  200. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/locdspnm.h +211 -0
  201. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/locid.h +1293 -0
  202. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/measfmt.h +501 -0
  203. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/measunit.h +3928 -0
  204. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/measure.h +174 -0
  205. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/messagepattern.h +950 -0
  206. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/module.modulemap +209 -0
  207. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/msgfmt.h +1117 -0
  208. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/normalizer2.h +791 -0
  209. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/normlzr.h +816 -0
  210. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/nounit.h +86 -0
  211. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/numberformatter.h +2862 -0
  212. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/numberrangeformatter.h +802 -0
  213. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/numfmt.h +1299 -0
  214. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/numsys.h +220 -0
  215. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/parseerr.h +94 -0
  216. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/parsepos.h +237 -0
  217. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/platform.h +874 -0
  218. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/plurfmt.h +601 -0
  219. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/plurrule.h +591 -0
  220. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ptypes.h +66 -0
  221. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/putil.h +183 -0
  222. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/rbbi.h +902 -0
  223. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/rbnf.h +1153 -0
  224. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/rbtz.h +373 -0
  225. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/regex.h +1882 -0
  226. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/region.h +229 -0
  227. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/reldatefmt.h +758 -0
  228. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/rep.h +266 -0
  229. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/resbund.h +489 -0
  230. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/schriter.h +187 -0
  231. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/scientificnumberformatter.h +222 -0
  232. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/search.h +580 -0
  233. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/selfmt.h +374 -0
  234. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/simpleformatter.h +414 -0
  235. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/simplenumberformatter.h +326 -0
  236. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/simpletz.h +940 -0
  237. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/smpdtfmt.h +1383 -0
  238. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/sortkey.h +344 -0
  239. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/std_string.h +41 -0
  240. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/strenum.h +281 -0
  241. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/stringoptions.h +190 -0
  242. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/stringpiece.h +354 -0
  243. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/stringtriebuilder.h +426 -0
  244. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/stsearch.h +509 -0
  245. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/symtable.h +119 -0
  246. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tblcoll.h +886 -0
  247. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/timezone.h +1067 -0
  248. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tmunit.h +142 -0
  249. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tmutamt.h +174 -0
  250. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tmutfmt.h +238 -0
  251. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/translit.h +1593 -0
  252. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tzfmt.h +1102 -0
  253. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tznames.h +419 -0
  254. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tzrule.h +820 -0
  255. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tztrans.h +201 -0
  256. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ualoc.h +372 -0
  257. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uameasureformat.h +487 -0
  258. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uameasureunit.h +249 -0
  259. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uatimeunitformat.h +377 -0
  260. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uatimezone.h +114 -0
  261. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ubidi.h +2368 -0
  262. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ubiditransform.h +326 -0
  263. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ubrk.h +684 -0
  264. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucal.h +1825 -0
  265. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucasemap.h +388 -0
  266. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucat.h +160 -0
  267. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uchar.h +4410 -0
  268. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucharstrie.h +623 -0
  269. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucharstriebuilder.h +193 -0
  270. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uchriter.h +393 -0
  271. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uclean.h +262 -0
  272. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucnv.h +2053 -0
  273. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucnv_cb.h +164 -0
  274. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucnv_err.h +465 -0
  275. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucnvsel.h +193 -0
  276. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucol.h +1649 -0
  277. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucoleitr.h +344 -0
  278. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uconfig.h +501 -0
  279. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucpmap.h +158 -0
  280. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucptrie.h +645 -0
  281. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucsdet.h +426 -0
  282. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucurr.h +466 -0
  283. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/udat.h +1767 -0
  284. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/udata.h +454 -0
  285. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/udateintervalformat.h +458 -0
  286. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/udatintv.h +146 -0
  287. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/udatpg.h +806 -0
  288. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/udisplaycontext.h +233 -0
  289. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/udisplayoptions.h +321 -0
  290. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uenum.h +209 -0
  291. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ufieldpositer.h +123 -0
  292. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uformattable.h +290 -0
  293. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uformattednumber.h +224 -0
  294. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uformattedvalue.h +445 -0
  295. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ugender.h +86 -0
  296. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uidna.h +794 -0
  297. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uiter.h +709 -0
  298. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uldnames.h +307 -0
  299. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ulistformatter.h +333 -0
  300. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uloc.h +1437 -0
  301. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ulocale.h +226 -0
  302. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ulocbuilder.h +437 -0
  303. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ulocdata.h +299 -0
  304. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/umachine.h +491 -0
  305. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/umisc.h +62 -0
  306. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/umsg.h +628 -0
  307. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/umutablecptrie.h +240 -0
  308. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unifilt.h +136 -0
  309. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unifunct.h +132 -0
  310. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unimatch.h +168 -0
  311. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unirepl.h +103 -0
  312. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uniset.h +1909 -0
  313. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unistr.h +5095 -0
  314. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unorm.h +476 -0
  315. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unorm2.h +626 -0
  316. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unum.h +1524 -0
  317. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unumberformatter.h +576 -0
  318. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unumberoptions.h +173 -0
  319. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unumberrangeformatter.h +471 -0
  320. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unumsys.h +176 -0
  321. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uobject.h +324 -0
  322. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uplrule.h +82 -0
  323. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/upluralrules.h +263 -0
  324. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/urbtok.h +276 -0
  325. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uregex.h +1617 -0
  326. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uregion.h +252 -0
  327. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ureldatefmt.h +510 -0
  328. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/urename.h +4026 -0
  329. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/urep.h +157 -0
  330. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ures.h +912 -0
  331. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uscript.h +742 -0
  332. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/usearch.h +911 -0
  333. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uset.h +1898 -0
  334. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/usetiter.h +323 -0
  335. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ushape.h +476 -0
  336. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/usimplenumberformatter.h +297 -0
  337. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uspoof.h +1852 -0
  338. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/usprep.h +274 -0
  339. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ustdio.h +1021 -0
  340. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ustream.h +69 -0
  341. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ustring.h +1719 -0
  342. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ustringtrie.h +97 -0
  343. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utext.h +1613 -0
  344. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utf.h +225 -0
  345. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utf16.h +740 -0
  346. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utf32.h +25 -0
  347. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utf8.h +882 -0
  348. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utf_old.h +1207 -0
  349. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utmscale.h +490 -0
  350. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utrace.h +506 -0
  351. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utrans.h +660 -0
  352. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utypes.h +826 -0
  353. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uvernum.h +191 -0
  354. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uversion.h +230 -0
  355. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/vtzone.h +471 -0
  356. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/Foundation.swiftmodule/wasm32-unknown-wasip1.swiftmodule +0 -0
  357. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/FoundationEssentials.swiftmodule/wasm32-unknown-wasip1.swiftmodule +0 -0
  358. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/FoundationInternationalization.swiftmodule/wasm32-unknown-wasip1.swiftmodule +0 -0
  359. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/FoundationXML.swiftmodule/wasm32-unknown-wasip1.swiftmodule +0 -0
  360. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/_FoundationCollections.swiftmodule/wasm32-unknown-wasip1.swiftmodule +0 -0
  361. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/libCoreFoundation.a +0 -0
  362. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/libFoundation.a +0 -0
  363. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/libFoundationEssentials.a +0 -0
  364. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/libFoundationInternationalization.a +0 -0
  365. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/libFoundationXML.a +0 -0
  366. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/lib_CFXMLInterface.a +0 -0
  367. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/lib_FoundationCShims.a +0 -0
  368. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/lib_FoundationCollections.a +0 -0
@@ -0,0 +1,2609 @@
1
+ // © 2016 and later: Unicode, Inc. and others.
2
+ // License & terms of use: http://www.unicode.org/copyright.html
3
+ /*
4
+ ********************************************************************************
5
+ * Copyright (C) 1997-2014, International Business Machines
6
+ * Corporation and others. All Rights Reserved.
7
+ ********************************************************************************
8
+ *
9
+ * File CALENDAR.H
10
+ *
11
+ * Modification History:
12
+ *
13
+ * Date Name Description
14
+ * 04/22/97 aliu Expanded and corrected comments and other header
15
+ * contents.
16
+ * 05/01/97 aliu Made equals(), before(), after() arguments const.
17
+ * 05/20/97 aliu Replaced fAreFieldsSet with fAreFieldsInSync and
18
+ * fAreAllFieldsSet.
19
+ * 07/27/98 stephen Sync up with JDK 1.2
20
+ * 11/15/99 weiv added YEAR_WOY and DOW_LOCAL
21
+ * to EDateFields
22
+ * 8/19/2002 srl Removed Javaisms
23
+ * 11/07/2003 srl Update, clean up documentation.
24
+ ********************************************************************************
25
+ */
26
+
27
+ #ifndef CALENDAR_H
28
+ #define CALENDAR_H
29
+
30
+ #include <_foundation_unicode/utypes.h>
31
+
32
+ #if U_SHOW_CPLUSPLUS_API
33
+
34
+ /**
35
+ * \file
36
+ * \brief C++ API: Calendar object
37
+ */
38
+ #if !UCONFIG_NO_FORMATTING
39
+
40
+ #include <_foundation_unicode/uobject.h>
41
+ #include <_foundation_unicode/locid.h>
42
+ #include <_foundation_unicode/timezone.h>
43
+ #include <_foundation_unicode/ucal.h>
44
+ #include <_foundation_unicode/umisc.h>
45
+
46
+ U_NAMESPACE_BEGIN
47
+
48
+ class ICUServiceFactory;
49
+
50
+ // Do not conditionalize the following with #ifndef U_HIDE_INTERNAL_API,
51
+ // it is a return type for a virtual method (@internal)
52
+ /**
53
+ * @internal
54
+ */
55
+ typedef int32_t UFieldResolutionTable[12][8];
56
+
57
+ class BasicTimeZone;
58
+ /**
59
+ * `Calendar` is an abstract base class for converting between
60
+ * a `UDate` object and a set of integer fields such as
61
+ * `YEAR`, `MONTH`, `DAY`, `HOUR`, and so on.
62
+ * (A `UDate` object represents a specific instant in
63
+ * time with millisecond precision. See UDate
64
+ * for information about the `UDate` class.)
65
+ *
66
+ * Subclasses of `Calendar` interpret a `UDate`
67
+ * according to the rules of a specific calendar system.
68
+ * The most commonly used subclass of `Calendar` is
69
+ * `GregorianCalendar`. Other subclasses could represent
70
+ * the various types of lunar calendars in use in many parts of the world.
71
+ *
72
+ * **NOTE**: (ICU 2.6) The subclass interface should be considered unstable -
73
+ * it WILL change.
74
+ *
75
+ * Like other locale-sensitive classes, `Calendar` provides a
76
+ * static method, `createInstance`, for getting a generally useful
77
+ * object of this type. `Calendar`'s `createInstance` method
78
+ * returns the appropriate `Calendar` subclass whose
79
+ * time fields have been initialized with the current date and time:
80
+ *
81
+ * Calendar *rightNow = Calendar::createInstance(errCode);
82
+ *
83
+ * A `Calendar` object can produce all the time field values
84
+ * needed to implement the date-time formatting for a particular language
85
+ * and calendar style (for example, Japanese-Gregorian, Japanese-Traditional).
86
+ *
87
+ * When computing a `UDate` from time fields, some special circumstances
88
+ * may arise: there may be insufficient information to compute the
89
+ * `UDate` (such as only year and month but no day in the month),
90
+ * there may be inconsistent information (such as "Tuesday, July 15, 1996"
91
+ * -- July 15, 1996 is actually a Monday), or the input time might be ambiguous
92
+ * because of time zone transition.
93
+ *
94
+ * **Insufficient information.** The calendar will use default
95
+ * information to specify the missing fields. This may vary by calendar; for
96
+ * the Gregorian calendar, the default for a field is the same as that of the
97
+ * start of the epoch: i.e., YEAR = 1970, MONTH = JANUARY, DATE = 1, etc.
98
+ *
99
+ * **Inconsistent information.** If fields conflict, the calendar
100
+ * will give preference to fields set more recently. For example, when
101
+ * determining the day, the calendar will look for one of the following
102
+ * combinations of fields. The most recent combination, as determined by the
103
+ * most recently set single field, will be used.
104
+ *
105
+ * MONTH + DAY_OF_MONTH
106
+ * MONTH + WEEK_OF_MONTH + DAY_OF_WEEK
107
+ * MONTH + DAY_OF_WEEK_IN_MONTH + DAY_OF_WEEK
108
+ * DAY_OF_YEAR
109
+ * DAY_OF_WEEK + WEEK_OF_YEAR
110
+ *
111
+ * For the time of day:
112
+ *
113
+ * HOUR_OF_DAY
114
+ * AM_PM + HOUR
115
+ *
116
+ * **Ambiguous Wall Clock Time.** When time offset from UTC has
117
+ * changed, it produces an ambiguous time slot around the transition. For example,
118
+ * many US locations observe daylight saving time. On the date switching to daylight
119
+ * saving time in US, wall clock time jumps from 12:59 AM (standard) to 2:00 AM
120
+ * (daylight). Therefore, wall clock time from 1:00 AM to 1:59 AM do not exist on
121
+ * the date. When the input wall time fall into this missing time slot, the ICU
122
+ * Calendar resolves the time using the UTC offset before the transition by default.
123
+ * In this example, 1:30 AM is interpreted as 1:30 AM standard time (non-exist),
124
+ * so the final result will be 2:30 AM daylight time.
125
+ *
126
+ * On the date switching back to standard time, wall clock time is moved back one
127
+ * hour at 2:00 AM. So wall clock time from 1:00 AM to 1:59 AM occur twice. In this
128
+ * case, the ICU Calendar resolves the time using the UTC offset after the transition
129
+ * by default. For example, 1:30 AM on the date is resolved as 1:30 AM standard time.
130
+ *
131
+ * Ambiguous wall clock time resolution behaviors can be customized by Calendar APIs
132
+ * {@link #setRepeatedWallTimeOption} and {@link #setSkippedWallTimeOption}.
133
+ * These methods are available in ICU 49 or later versions.
134
+ *
135
+ * **Note:** for some non-Gregorian calendars, different
136
+ * fields may be necessary for complete disambiguation. For example, a full
137
+ * specification of the historical Arabic astronomical calendar requires year,
138
+ * month, day-of-month *and* day-of-week in some cases.
139
+ *
140
+ * **Note:** There are certain possible ambiguities in
141
+ * interpretation of certain singular times, which are resolved in the
142
+ * following ways:
143
+ *
144
+ * 1. 24:00:00 "belongs" to the following day. That is,
145
+ * 23:59 on Dec 31, 1969 < 24:00 on Jan 1, 1970 < 24:01:00 on Jan 1, 1970
146
+ * 2. Although historically not precise, midnight also belongs to "am",
147
+ * and noon belongs to "pm", so on the same day,
148
+ * 12:00 am (midnight) < 12:01 am, and 12:00 pm (noon) < 12:01 pm
149
+ *
150
+ * The date or time format strings are not part of the definition of a
151
+ * calendar, as those must be modifiable or overridable by the user at
152
+ * runtime. Use `DateFormat` to format dates.
153
+ *
154
+ * `Calendar` provides an API for field "rolling", where fields
155
+ * can be incremented or decremented, but wrap around. For example, rolling the
156
+ * month up in the date December 12, **1996** results in
157
+ * January 12, **1996**.
158
+ *
159
+ * `Calendar` also provides a date arithmetic function for
160
+ * adding the specified (signed) amount of time to a particular time field.
161
+ * For example, subtracting 5 days from the date `September 12, 1996`
162
+ * results in `September 7, 1996`.
163
+ *
164
+ * ***Supported range***
165
+ *
166
+ * The allowable range of `Calendar` has been narrowed. `GregorianCalendar` used
167
+ * to attempt to support the range of dates with millisecond values from
168
+ * `Long.MIN_VALUE` to `Long.MAX_VALUE`. The new `Calendar` protocol specifies the
169
+ * maximum range of supportable dates as those having Julian day numbers
170
+ * of `-0x7F000000` to `+0x7F000000`. This corresponds to years from ~5,800,000 BCE
171
+ * to ~5,800,000 CE. Programmers should use the protected constants in `Calendar` to
172
+ * specify an extremely early or extremely late date.
173
+ *
174
+ * <p>
175
+ * The Japanese calendar uses a combination of era name and year number.
176
+ * When an emperor of Japan abdicates and a new emperor ascends the throne,
177
+ * a new era is declared and year number is reset to 1. Even if the date of
178
+ * abdication is scheduled ahead of time, the new era name might not be
179
+ * announced until just before the date. In such case, ICU4C may include
180
+ * a start date of future era without actual era name, but not enabled
181
+ * by default. ICU4C users who want to test the behavior of the future era
182
+ * can enable the tentative era by:
183
+ * <ul>
184
+ * <li>Environment variable <code>ICU_ENABLE_TENTATIVE_ERA=true</code>.</li>
185
+ * </ul>
186
+ *
187
+ * @stable ICU 2.0
188
+ */
189
+ class U_I18N_API Calendar : public UObject {
190
+ public:
191
+ #ifndef U_FORCE_HIDE_DEPRECATED_API
192
+ /**
193
+ * Field IDs for date and time. Used to specify date/time fields. ERA is calendar
194
+ * specific. Example ranges given are for illustration only; see specific Calendar
195
+ * subclasses for actual ranges.
196
+ * @deprecated ICU 2.6. Use C enum UCalendarDateFields defined in ucal.h
197
+ */
198
+ enum EDateFields {
199
+ #ifndef U_HIDE_DEPRECATED_API
200
+ /*
201
+ * ERA may be defined on other platforms. To avoid any potential problems undefined it here.
202
+ */
203
+ #ifdef ERA
204
+ #undef ERA
205
+ #endif
206
+ ERA, // Example: 0..1
207
+ YEAR, // Example: 1..big number
208
+ MONTH, // Example: 0..11
209
+ WEEK_OF_YEAR, // Example: 1..53
210
+ WEEK_OF_MONTH, // Example: 1..4
211
+ DATE, // Example: 1..31
212
+ DAY_OF_YEAR, // Example: 1..365
213
+ DAY_OF_WEEK, // Example: 1..7
214
+ DAY_OF_WEEK_IN_MONTH, // Example: 1..4, may be specified as -1
215
+ AM_PM, // Example: 0..1
216
+ HOUR, // Example: 0..11
217
+ HOUR_OF_DAY, // Example: 0..23
218
+ MINUTE, // Example: 0..59
219
+ SECOND, // Example: 0..59
220
+ MILLISECOND, // Example: 0..999
221
+ ZONE_OFFSET, // Example: -12*U_MILLIS_PER_HOUR..12*U_MILLIS_PER_HOUR
222
+ DST_OFFSET, // Example: 0 or U_MILLIS_PER_HOUR
223
+ YEAR_WOY, // 'Y' Example: 1..big number - Year of Week of Year
224
+ DOW_LOCAL, // 'e' Example: 1..7 - Day of Week / Localized
225
+
226
+ EXTENDED_YEAR,
227
+ JULIAN_DAY,
228
+ MILLISECONDS_IN_DAY,
229
+ IS_LEAP_MONTH,
230
+
231
+ FIELD_COUNT = UCAL_FIELD_COUNT // See ucal.h for other fields.
232
+ #endif /* U_HIDE_DEPRECATED_API */
233
+ };
234
+ #endif // U_FORCE_HIDE_DEPRECATED_API
235
+
236
+ #ifndef U_HIDE_DEPRECATED_API
237
+ /**
238
+ * Useful constant for days of week. Note: Calendar day-of-week is 1-based. Clients
239
+ * who create locale resources for the field of first-day-of-week should be aware of
240
+ * this. For instance, in US locale, first-day-of-week is set to 1, i.e., SUNDAY.
241
+ * @deprecated ICU 2.6. Use C enum UCalendarDaysOfWeek defined in ucal.h
242
+ */
243
+ enum EDaysOfWeek {
244
+ SUNDAY = 1,
245
+ MONDAY,
246
+ TUESDAY,
247
+ WEDNESDAY,
248
+ THURSDAY,
249
+ FRIDAY,
250
+ SATURDAY
251
+ };
252
+
253
+ /**
254
+ * Useful constants for month. Note: Calendar month is 0-based.
255
+ * @deprecated ICU 2.6. Use C enum UCalendarMonths defined in ucal.h
256
+ */
257
+ enum EMonths {
258
+ JANUARY,
259
+ FEBRUARY,
260
+ MARCH,
261
+ APRIL,
262
+ MAY,
263
+ JUNE,
264
+ JULY,
265
+ AUGUST,
266
+ SEPTEMBER,
267
+ OCTOBER,
268
+ NOVEMBER,
269
+ DECEMBER,
270
+ UNDECIMBER
271
+ };
272
+
273
+ /**
274
+ * Useful constants for hour in 12-hour clock. Used in GregorianCalendar.
275
+ * @deprecated ICU 2.6. Use C enum UCalendarAMPMs defined in ucal.h
276
+ */
277
+ enum EAmpm {
278
+ AM,
279
+ PM
280
+ };
281
+ #endif /* U_HIDE_DEPRECATED_API */
282
+
283
+ /**
284
+ * destructor
285
+ * @stable ICU 2.0
286
+ */
287
+ virtual ~Calendar();
288
+
289
+ /**
290
+ * Create and return a polymorphic copy of this calendar.
291
+ *
292
+ * @return a polymorphic copy of this calendar.
293
+ * @stable ICU 2.0
294
+ */
295
+ virtual Calendar* clone() const = 0;
296
+
297
+ /**
298
+ * Creates a Calendar using the default timezone and locale. Clients are responsible
299
+ * for deleting the object returned.
300
+ *
301
+ * @param success Indicates the success/failure of Calendar creation. Filled in
302
+ * with U_ZERO_ERROR if created successfully, set to a failure result
303
+ * otherwise. U_MISSING_RESOURCE_ERROR will be returned if the resource data
304
+ * requests a calendar type which has not been installed.
305
+ * @return A Calendar if created successfully. nullptr otherwise.
306
+ * @stable ICU 2.0
307
+ */
308
+ static Calendar* U_EXPORT2 createInstance(UErrorCode& success);
309
+
310
+ /**
311
+ * Creates a Calendar using the given timezone and the default locale.
312
+ * The Calendar takes ownership of zoneToAdopt; the
313
+ * client must not delete it.
314
+ *
315
+ * @param zoneToAdopt The given timezone to be adopted.
316
+ * @param success Indicates the success/failure of Calendar creation. Filled in
317
+ * with U_ZERO_ERROR if created successfully, set to a failure result
318
+ * otherwise.
319
+ * @return A Calendar if created successfully. nullptr otherwise.
320
+ * @stable ICU 2.0
321
+ */
322
+ static Calendar* U_EXPORT2 createInstance(TimeZone* zoneToAdopt, UErrorCode& success);
323
+
324
+ /**
325
+ * Creates a Calendar using the given timezone and the default locale. The TimeZone
326
+ * is _not_ adopted; the client is still responsible for deleting it.
327
+ *
328
+ * @param zone The timezone.
329
+ * @param success Indicates the success/failure of Calendar creation. Filled in
330
+ * with U_ZERO_ERROR if created successfully, set to a failure result
331
+ * otherwise.
332
+ * @return A Calendar if created successfully. nullptr otherwise.
333
+ * @stable ICU 2.0
334
+ */
335
+ static Calendar* U_EXPORT2 createInstance(const TimeZone& zone, UErrorCode& success);
336
+
337
+ /**
338
+ * Creates a Calendar using the default timezone and the given locale.
339
+ *
340
+ * @param aLocale The given locale.
341
+ * @param success Indicates the success/failure of Calendar creation. Filled in
342
+ * with U_ZERO_ERROR if created successfully, set to a failure result
343
+ * otherwise.
344
+ * @return A Calendar if created successfully. nullptr otherwise.
345
+ * @stable ICU 2.0
346
+ */
347
+ static Calendar* U_EXPORT2 createInstance(const Locale& aLocale, UErrorCode& success);
348
+
349
+ /**
350
+ * Creates a Calendar using the given timezone and given locale.
351
+ * The Calendar takes ownership of zoneToAdopt; the
352
+ * client must not delete it.
353
+ *
354
+ * @param zoneToAdopt The given timezone to be adopted.
355
+ * @param aLocale The given locale.
356
+ * @param success Indicates the success/failure of Calendar creation. Filled in
357
+ * with U_ZERO_ERROR if created successfully, set to a failure result
358
+ * otherwise.
359
+ * @return A Calendar if created successfully. nullptr otherwise.
360
+ * @stable ICU 2.0
361
+ */
362
+ static Calendar* U_EXPORT2 createInstance(TimeZone* zoneToAdopt, const Locale& aLocale, UErrorCode& success);
363
+
364
+ /**
365
+ * Gets a Calendar using the given timezone and given locale. The TimeZone
366
+ * is _not_ adopted; the client is still responsible for deleting it.
367
+ *
368
+ * @param zone The given timezone.
369
+ * @param aLocale The given locale.
370
+ * @param success Indicates the success/failure of Calendar creation. Filled in
371
+ * with U_ZERO_ERROR if created successfully, set to a failure result
372
+ * otherwise.
373
+ * @return A Calendar if created successfully. nullptr otherwise.
374
+ * @stable ICU 2.0
375
+ */
376
+ static Calendar* U_EXPORT2 createInstance(const TimeZone& zone, const Locale& aLocale, UErrorCode& success);
377
+
378
+ /**
379
+ * Returns a list of the locales for which Calendars are installed.
380
+ *
381
+ * @param count Number of locales returned.
382
+ * @return An array of Locale objects representing the set of locales for which
383
+ * Calendars are installed. The system retains ownership of this list;
384
+ * the caller must NOT delete it. Does not include user-registered Calendars.
385
+ * @stable ICU 2.0
386
+ */
387
+ static const Locale* U_EXPORT2 getAvailableLocales(int32_t& count);
388
+
389
+
390
+ /**
391
+ * Given a key and a locale, returns an array of string values in a preferred
392
+ * order that would make a difference. These are all and only those values where
393
+ * the open (creation) of the service with the locale formed from the input locale
394
+ * plus input keyword and that value has different behavior than creation with the
395
+ * input locale alone.
396
+ * @param key one of the keys supported by this service. For now, only
397
+ * "calendar" is supported.
398
+ * @param locale the locale
399
+ * @param commonlyUsed if set to true it will return only commonly used values
400
+ * with the given locale in preferred order. Otherwise,
401
+ * it will return all the available values for the locale.
402
+ * @param status ICU Error Code
403
+ * @return a string enumeration over keyword values for the given key and the locale.
404
+ * @stable ICU 4.2
405
+ */
406
+ static StringEnumeration* U_EXPORT2 getKeywordValuesForLocale(const char* key,
407
+ const Locale& locale, UBool commonlyUsed, UErrorCode& status);
408
+
409
+ /**
410
+ * Returns the current UTC (GMT) time measured in milliseconds since 0:00:00 on 1/1/70
411
+ * (derived from the system time).
412
+ *
413
+ * @return The current UTC time in milliseconds.
414
+ * @stable ICU 2.0
415
+ */
416
+ static UDate U_EXPORT2 getNow();
417
+
418
+ /**
419
+ * Gets this Calendar's time as milliseconds. May involve recalculation of time due
420
+ * to previous calls to set time field values. The time specified is non-local UTC
421
+ * (GMT) time. Although this method is const, this object may actually be changed
422
+ * (semantically const).
423
+ *
424
+ * @param status Output param set to success/failure code on exit. If any value
425
+ * previously set in the time field is invalid or restricted by
426
+ * leniency, this will be set to an error status.
427
+ * @return The current time in UTC (GMT) time, or zero if the operation
428
+ * failed.
429
+ * @stable ICU 2.0
430
+ */
431
+ inline UDate getTime(UErrorCode& status) const { return getTimeInMillis(status); }
432
+
433
+ /**
434
+ * Sets this Calendar's current time with the given UDate. The time specified should
435
+ * be in non-local UTC (GMT) time.
436
+ *
437
+ * @param date The given UDate in UTC (GMT) time.
438
+ * @param status Output param set to success/failure code on exit. If any value
439
+ * set in the time field is invalid or restricted by
440
+ * leniency, this will be set to an error status.
441
+ * @stable ICU 2.0
442
+ */
443
+ inline void setTime(UDate date, UErrorCode& status) { setTimeInMillis(date, status); }
444
+
445
+ /**
446
+ * Compares the equality of two Calendar objects. Objects of different subclasses
447
+ * are considered unequal. This comparison is very exacting; two Calendar objects
448
+ * must be in exactly the same state to be considered equal. To compare based on the
449
+ * represented time, use equals() instead.
450
+ *
451
+ * @param that The Calendar object to be compared with.
452
+ * @return true if the given Calendar is the same as this Calendar; false
453
+ * otherwise.
454
+ * @stable ICU 2.0
455
+ */
456
+ virtual bool operator==(const Calendar& that) const;
457
+
458
+ /**
459
+ * Compares the inequality of two Calendar objects.
460
+ *
461
+ * @param that The Calendar object to be compared with.
462
+ * @return true if the given Calendar is not the same as this Calendar; false
463
+ * otherwise.
464
+ * @stable ICU 2.0
465
+ */
466
+ bool operator!=(const Calendar& that) const {return !operator==(that);}
467
+
468
+ /**
469
+ * Returns true if the given Calendar object is equivalent to this
470
+ * one. An equivalent Calendar will behave exactly as this one
471
+ * does, but it may be set to a different time. By contrast, for
472
+ * the operator==() method to return true, the other Calendar must
473
+ * be set to the same time.
474
+ *
475
+ * @param other the Calendar to be compared with this Calendar
476
+ * @stable ICU 2.4
477
+ */
478
+ virtual UBool isEquivalentTo(const Calendar& other) const;
479
+
480
+ /**
481
+ * Compares the Calendar time, whereas Calendar::operator== compares the equality of
482
+ * Calendar objects.
483
+ *
484
+ * @param when The Calendar to be compared with this Calendar. Although this is a
485
+ * const parameter, the object may be modified physically
486
+ * (semantically const).
487
+ * @param status Output param set to success/failure code on exit. If any value
488
+ * previously set in the time field is invalid or restricted by
489
+ * leniency, this will be set to an error status.
490
+ * @return True if the current time of this Calendar is equal to the time of
491
+ * Calendar when; false otherwise.
492
+ * @stable ICU 2.0
493
+ */
494
+ UBool equals(const Calendar& when, UErrorCode& status) const;
495
+
496
+ /**
497
+ * Returns true if this Calendar's current time is before "when"'s current time.
498
+ *
499
+ * @param when The Calendar to be compared with this Calendar. Although this is a
500
+ * const parameter, the object may be modified physically
501
+ * (semantically const).
502
+ * @param status Output param set to success/failure code on exit. If any value
503
+ * previously set in the time field is invalid or restricted by
504
+ * leniency, this will be set to an error status.
505
+ * @return True if the current time of this Calendar is before the time of
506
+ * Calendar when; false otherwise.
507
+ * @stable ICU 2.0
508
+ */
509
+ UBool before(const Calendar& when, UErrorCode& status) const;
510
+
511
+ /**
512
+ * Returns true if this Calendar's current time is after "when"'s current time.
513
+ *
514
+ * @param when The Calendar to be compared with this Calendar. Although this is a
515
+ * const parameter, the object may be modified physically
516
+ * (semantically const).
517
+ * @param status Output param set to success/failure code on exit. If any value
518
+ * previously set in the time field is invalid or restricted by
519
+ * leniency, this will be set to an error status.
520
+ * @return True if the current time of this Calendar is after the time of
521
+ * Calendar when; false otherwise.
522
+ * @stable ICU 2.0
523
+ */
524
+ UBool after(const Calendar& when, UErrorCode& status) const;
525
+
526
+ #ifndef U_FORCE_HIDE_DEPRECATED_API
527
+ /**
528
+ * UDate Arithmetic function. Adds the specified (signed) amount of time to the given
529
+ * time field, based on the calendar's rules. For example, to subtract 5 days from
530
+ * the current time of the calendar, call add(Calendar::DATE, -5). When adding on
531
+ * the month or Calendar::MONTH field, other fields like date might conflict and
532
+ * need to be changed. For instance, adding 1 month on the date 01/31/96 will result
533
+ * in 02/29/96.
534
+ * Adding a positive value always means moving forward in time, so for the Gregorian calendar,
535
+ * starting with 100 BC and adding +1 to year results in 99 BC (even though this actually reduces
536
+ * the numeric value of the field itself).
537
+ *
538
+ * @param field Specifies which date field to modify.
539
+ * @param amount The amount of time to be added to the field, in the natural unit
540
+ * for that field (e.g., days for the day fields, hours for the hour
541
+ * field.)
542
+ * @param status Output param set to success/failure code on exit. If any value
543
+ * previously set in the time field is invalid or restricted by
544
+ * leniency, this will be set to an error status.
545
+ * @deprecated ICU 2.6. use add(UCalendarDateFields field, int32_t amount, UErrorCode& status) instead.
546
+ */
547
+ virtual void add(EDateFields field, int32_t amount, UErrorCode& status);
548
+ #endif // U_FORCE_HIDE_DEPRECATED_API
549
+
550
+ /**
551
+ * UDate Arithmetic function. Adds the specified (signed) amount of time to the given
552
+ * time field, based on the calendar's rules. For example, to subtract 5 days from
553
+ * the current time of the calendar, call add(Calendar::DATE, -5). When adding on
554
+ * the month or Calendar::MONTH field, other fields like date might conflict and
555
+ * need to be changed. For instance, adding 1 month on the date 01/31/96 will result
556
+ * in 02/29/96.
557
+ * Adding a positive value always means moving forward in time, so for the Gregorian calendar,
558
+ * starting with 100 BC and adding +1 to year results in 99 BC (even though this actually reduces
559
+ * the numeric value of the field itself).
560
+ *
561
+ * @param field Specifies which date field to modify.
562
+ * @param amount The amount of time to be added to the field, in the natural unit
563
+ * for that field (e.g., days for the day fields, hours for the hour
564
+ * field.)
565
+ * @param status Output param set to success/failure code on exit. If any value
566
+ * previously set in the time field is invalid or restricted by
567
+ * leniency, this will be set to an error status.
568
+ * @stable ICU 2.6.
569
+ */
570
+ virtual void add(UCalendarDateFields field, int32_t amount, UErrorCode& status);
571
+
572
+ #ifndef U_HIDE_DEPRECATED_API
573
+ /**
574
+ * Time Field Rolling function. Rolls (up/down) a single unit of time on the given
575
+ * time field. For example, to roll the current date up by one day, call
576
+ * roll(Calendar::DATE, true). When rolling on the year or Calendar::YEAR field, it
577
+ * will roll the year value in the range between getMinimum(Calendar::YEAR) and the
578
+ * value returned by getMaximum(Calendar::YEAR). When rolling on the month or
579
+ * Calendar::MONTH field, other fields like date might conflict and, need to be
580
+ * changed. For instance, rolling the month up on the date 01/31/96 will result in
581
+ * 02/29/96. Rolling up always means rolling forward in time (unless the limit of the
582
+ * field is reached, in which case it may pin or wrap), so for Gregorian calendar,
583
+ * starting with 100 BC and rolling the year up results in 99 BC.
584
+ * When eras have a definite beginning and end (as in the Chinese calendar, or as in
585
+ * most eras in the Japanese calendar) then rolling the year past either limit of the
586
+ * era will cause the year to wrap around. When eras only have a limit at one end,
587
+ * then attempting to roll the year past that limit will result in pinning the year
588
+ * at that limit. Note that for most calendars in which era 0 years move forward in
589
+ * time (such as Buddhist, Hebrew, or Islamic), it is possible for add or roll to
590
+ * result in negative years for era 0 (that is the only way to represent years before
591
+ * the calendar epoch).
592
+ * When rolling on the hour-in-day or Calendar::HOUR_OF_DAY field, it will roll the
593
+ * hour value in the range between 0 and 23, which is zero-based.
594
+ * <P>
595
+ * NOTE: Do not use this method -- use roll(EDateFields, int, UErrorCode&) instead.
596
+ *
597
+ * @param field The time field.
598
+ * @param up Indicates if the value of the specified time field is to be rolled
599
+ * up or rolled down. Use true if rolling up, false otherwise.
600
+ * @param status Output param set to success/failure code on exit. If any value
601
+ * previously set in the time field is invalid or restricted by
602
+ * leniency, this will be set to an error status.
603
+ * @deprecated ICU 2.6. Use roll(UCalendarDateFields field, UBool up, UErrorCode& status) instead.
604
+ */
605
+ inline void roll(EDateFields field, UBool up, UErrorCode& status);
606
+ #endif /* U_HIDE_DEPRECATED_API */
607
+
608
+ /**
609
+ * Time Field Rolling function. Rolls (up/down) a single unit of time on the given
610
+ * time field. For example, to roll the current date up by one day, call
611
+ * roll(Calendar::DATE, true). When rolling on the year or Calendar::YEAR field, it
612
+ * will roll the year value in the range between getMinimum(Calendar::YEAR) and the
613
+ * value returned by getMaximum(Calendar::YEAR). When rolling on the month or
614
+ * Calendar::MONTH field, other fields like date might conflict and, need to be
615
+ * changed. For instance, rolling the month up on the date 01/31/96 will result in
616
+ * 02/29/96. Rolling up always means rolling forward in time (unless the limit of the
617
+ * field is reached, in which case it may pin or wrap), so for Gregorian calendar,
618
+ * starting with 100 BC and rolling the year up results in 99 BC.
619
+ * When eras have a definite beginning and end (as in the Chinese calendar, or as in
620
+ * most eras in the Japanese calendar) then rolling the year past either limit of the
621
+ * era will cause the year to wrap around. When eras only have a limit at one end,
622
+ * then attempting to roll the year past that limit will result in pinning the year
623
+ * at that limit. Note that for most calendars in which era 0 years move forward in
624
+ * time (such as Buddhist, Hebrew, or Islamic), it is possible for add or roll to
625
+ * result in negative years for era 0 (that is the only way to represent years before
626
+ * the calendar epoch).
627
+ * When rolling on the hour-in-day or Calendar::HOUR_OF_DAY field, it will roll the
628
+ * hour value in the range between 0 and 23, which is zero-based.
629
+ * <P>
630
+ * NOTE: Do not use this method -- use roll(UCalendarDateFields, int, UErrorCode&) instead.
631
+ *
632
+ * @param field The time field.
633
+ * @param up Indicates if the value of the specified time field is to be rolled
634
+ * up or rolled down. Use true if rolling up, false otherwise.
635
+ * @param status Output param set to success/failure code on exit. If any value
636
+ * previously set in the time field is invalid or restricted by
637
+ * leniency, this will be set to an error status.
638
+ * @stable ICU 2.6.
639
+ */
640
+ inline void roll(UCalendarDateFields field, UBool up, UErrorCode& status);
641
+
642
+ #ifndef U_FORCE_HIDE_DEPRECATED_API
643
+ /**
644
+ * Time Field Rolling function. Rolls by the given amount on the given
645
+ * time field. For example, to roll the current date up by one day, call
646
+ * roll(Calendar::DATE, +1, status). When rolling on the month or
647
+ * Calendar::MONTH field, other fields like date might conflict and, need to be
648
+ * changed. For instance, rolling the month up on the date 01/31/96 will result in
649
+ * 02/29/96. Rolling by a positive value always means rolling forward in time (unless
650
+ * the limit of the field is reached, in which case it may pin or wrap), so for
651
+ * Gregorian calendar, starting with 100 BC and rolling the year by + 1 results in 99 BC.
652
+ * When eras have a definite beginning and end (as in the Chinese calendar, or as in
653
+ * most eras in the Japanese calendar) then rolling the year past either limit of the
654
+ * era will cause the year to wrap around. When eras only have a limit at one end,
655
+ * then attempting to roll the year past that limit will result in pinning the year
656
+ * at that limit. Note that for most calendars in which era 0 years move forward in
657
+ * time (such as Buddhist, Hebrew, or Islamic), it is possible for add or roll to
658
+ * result in negative years for era 0 (that is the only way to represent years before
659
+ * the calendar epoch).
660
+ * When rolling on the hour-in-day or Calendar::HOUR_OF_DAY field, it will roll the
661
+ * hour value in the range between 0 and 23, which is zero-based.
662
+ * <P>
663
+ * The only difference between roll() and add() is that roll() does not change
664
+ * the value of more significant fields when it reaches the minimum or maximum
665
+ * of its range, whereas add() does.
666
+ *
667
+ * @param field The time field.
668
+ * @param amount Indicates amount to roll.
669
+ * @param status Output param set to success/failure code on exit. If any value
670
+ * previously set in the time field is invalid, this will be set to
671
+ * an error status.
672
+ * @deprecated ICU 2.6. Use roll(UCalendarDateFields field, int32_t amount, UErrorCode& status) instead.
673
+ */
674
+ virtual void roll(EDateFields field, int32_t amount, UErrorCode& status);
675
+ #endif // U_FORCE_HIDE_DEPRECATED_API
676
+
677
+ /**
678
+ * Time Field Rolling function. Rolls by the given amount on the given
679
+ * time field. For example, to roll the current date up by one day, call
680
+ * roll(Calendar::DATE, +1, status). When rolling on the month or
681
+ * Calendar::MONTH field, other fields like date might conflict and, need to be
682
+ * changed. For instance, rolling the month up on the date 01/31/96 will result in
683
+ * 02/29/96. Rolling by a positive value always means rolling forward in time (unless
684
+ * the limit of the field is reached, in which case it may pin or wrap), so for
685
+ * Gregorian calendar, starting with 100 BC and rolling the year by + 1 results in 99 BC.
686
+ * When eras have a definite beginning and end (as in the Chinese calendar, or as in
687
+ * most eras in the Japanese calendar) then rolling the year past either limit of the
688
+ * era will cause the year to wrap around. When eras only have a limit at one end,
689
+ * then attempting to roll the year past that limit will result in pinning the year
690
+ * at that limit. Note that for most calendars in which era 0 years move forward in
691
+ * time (such as Buddhist, Hebrew, or Islamic), it is possible for add or roll to
692
+ * result in negative years for era 0 (that is the only way to represent years before
693
+ * the calendar epoch).
694
+ * When rolling on the hour-in-day or Calendar::HOUR_OF_DAY field, it will roll the
695
+ * hour value in the range between 0 and 23, which is zero-based.
696
+ * <P>
697
+ * The only difference between roll() and add() is that roll() does not change
698
+ * the value of more significant fields when it reaches the minimum or maximum
699
+ * of its range, whereas add() does.
700
+ *
701
+ * @param field The time field.
702
+ * @param amount Indicates amount to roll.
703
+ * @param status Output param set to success/failure code on exit. If any value
704
+ * previously set in the time field is invalid, this will be set to
705
+ * an error status.
706
+ * @stable ICU 2.6.
707
+ */
708
+ virtual void roll(UCalendarDateFields field, int32_t amount, UErrorCode& status);
709
+
710
+ #ifndef U_FORCE_HIDE_DEPRECATED_API
711
+ /**
712
+ * Return the difference between the given time and the time this
713
+ * calendar object is set to. If this calendar is set
714
+ * <em>before</em> the given time, the returned value will be
715
+ * positive. If this calendar is set <em>after</em> the given
716
+ * time, the returned value will be negative. The
717
+ * <code>field</code> parameter specifies the units of the return
718
+ * value. For example, if <code>fieldDifference(when,
719
+ * Calendar::MONTH)</code> returns 3, then this calendar is set to
720
+ * 3 months before <code>when</code>, and possibly some addition
721
+ * time less than one month.
722
+ *
723
+ * <p>As a side effect of this call, this calendar is advanced
724
+ * toward <code>when</code> by the given amount. That is, calling
725
+ * this method has the side effect of calling <code>add(field,
726
+ * n)</code>, where <code>n</code> is the return value.
727
+ *
728
+ * <p>Usage: To use this method, call it first with the largest
729
+ * field of interest, then with progressively smaller fields. For
730
+ * example:
731
+ *
732
+ * <pre>
733
+ * int y = cal->fieldDifference(when, Calendar::YEAR, err);
734
+ * int m = cal->fieldDifference(when, Calendar::MONTH, err);
735
+ * int d = cal->fieldDifference(when, Calendar::DATE, err);</pre>
736
+ *
737
+ * computes the difference between <code>cal</code> and
738
+ * <code>when</code> in years, months, and days.
739
+ *
740
+ * <p>Note: <code>fieldDifference()</code> is
741
+ * <em>asymmetrical</em>. That is, in the following code:
742
+ *
743
+ * <pre>
744
+ * cal->setTime(date1, err);
745
+ * int m1 = cal->fieldDifference(date2, Calendar::MONTH, err);
746
+ * int d1 = cal->fieldDifference(date2, Calendar::DATE, err);
747
+ * cal->setTime(date2, err);
748
+ * int m2 = cal->fieldDifference(date1, Calendar::MONTH, err);
749
+ * int d2 = cal->fieldDifference(date1, Calendar::DATE, err);</pre>
750
+ *
751
+ * one might expect that <code>m1 == -m2 && d1 == -d2</code>.
752
+ * However, this is not generally the case, because of
753
+ * irregularities in the underlying calendar system (e.g., the
754
+ * Gregorian calendar has a varying number of days per month).
755
+ *
756
+ * @param when the date to compare this calendar's time to
757
+ * @param field the field in which to compute the result
758
+ * @param status Output param set to success/failure code on exit. If any value
759
+ * previously set in the time field is invalid, this will be set to
760
+ * an error status.
761
+ * @return the difference, either positive or negative, between
762
+ * this calendar's time and <code>when</code>, in terms of
763
+ * <code>field</code>.
764
+ * @deprecated ICU 2.6. Use fieldDifference(UDate when, UCalendarDateFields field, UErrorCode& status).
765
+ */
766
+ virtual int32_t fieldDifference(UDate when, EDateFields field, UErrorCode& status);
767
+ #endif // U_FORCE_HIDE_DEPRECATED_API
768
+
769
+ /**
770
+ * Return the difference between the given time and the time this
771
+ * calendar object is set to. If this calendar is set
772
+ * <em>before</em> the given time, the returned value will be
773
+ * positive. If this calendar is set <em>after</em> the given
774
+ * time, the returned value will be negative. The
775
+ * <code>field</code> parameter specifies the units of the return
776
+ * value. For example, if <code>fieldDifference(when,
777
+ * Calendar::MONTH)</code> returns 3, then this calendar is set to
778
+ * 3 months before <code>when</code>, and possibly some addition
779
+ * time less than one month.
780
+ *
781
+ * <p>As a side effect of this call, this calendar is advanced
782
+ * toward <code>when</code> by the given amount. That is, calling
783
+ * this method has the side effect of calling <code>add(field,
784
+ * n)</code>, where <code>n</code> is the return value.
785
+ *
786
+ * <p>Usage: To use this method, call it first with the largest
787
+ * field of interest, then with progressively smaller fields. For
788
+ * example:
789
+ *
790
+ * <pre>
791
+ * int y = cal->fieldDifference(when, Calendar::YEAR, err);
792
+ * int m = cal->fieldDifference(when, Calendar::MONTH, err);
793
+ * int d = cal->fieldDifference(when, Calendar::DATE, err);</pre>
794
+ *
795
+ * computes the difference between <code>cal</code> and
796
+ * <code>when</code> in years, months, and days.
797
+ *
798
+ * <p>Note: <code>fieldDifference()</code> is
799
+ * <em>asymmetrical</em>. That is, in the following code:
800
+ *
801
+ * <pre>
802
+ * cal->setTime(date1, err);
803
+ * int m1 = cal->fieldDifference(date2, Calendar::MONTH, err);
804
+ * int d1 = cal->fieldDifference(date2, Calendar::DATE, err);
805
+ * cal->setTime(date2, err);
806
+ * int m2 = cal->fieldDifference(date1, Calendar::MONTH, err);
807
+ * int d2 = cal->fieldDifference(date1, Calendar::DATE, err);</pre>
808
+ *
809
+ * one might expect that <code>m1 == -m2 && d1 == -d2</code>.
810
+ * However, this is not generally the case, because of
811
+ * irregularities in the underlying calendar system (e.g., the
812
+ * Gregorian calendar has a varying number of days per month).
813
+ *
814
+ * @param when the date to compare this calendar's time to
815
+ * @param field the field in which to compute the result
816
+ * @param status Output param set to success/failure code on exit. If any value
817
+ * previously set in the time field is invalid, this will be set to
818
+ * an error status.
819
+ * @return the difference, either positive or negative, between
820
+ * this calendar's time and <code>when</code>, in terms of
821
+ * <code>field</code>.
822
+ * @stable ICU 2.6.
823
+ */
824
+ virtual int32_t fieldDifference(UDate when, UCalendarDateFields field, UErrorCode& status);
825
+
826
+ /**
827
+ * Sets the calendar's time zone to be the one passed in. The Calendar takes ownership
828
+ * of the TimeZone; the caller is no longer responsible for deleting it. If the
829
+ * given time zone is nullptr, this function has no effect.
830
+ *
831
+ * @param value The given time zone.
832
+ * @stable ICU 2.0
833
+ */
834
+ void adoptTimeZone(TimeZone* value);
835
+
836
+ /**
837
+ * Sets the calendar's time zone to be the same as the one passed in. The TimeZone
838
+ * passed in is _not_ adopted; the client is still responsible for deleting it.
839
+ *
840
+ * @param zone The given time zone.
841
+ * @stable ICU 2.0
842
+ */
843
+ void setTimeZone(const TimeZone& zone);
844
+
845
+ /**
846
+ * Returns a reference to the time zone owned by this calendar. The returned reference
847
+ * is only valid until clients make another call to adoptTimeZone or setTimeZone,
848
+ * or this Calendar is destroyed.
849
+ *
850
+ * @return The time zone object associated with this calendar.
851
+ * @stable ICU 2.0
852
+ */
853
+ const TimeZone& getTimeZone() const;
854
+
855
+ /**
856
+ * Returns the time zone owned by this calendar. The caller owns the returned object
857
+ * and must delete it when done. After this call, the new time zone associated
858
+ * with this Calendar is the default TimeZone as returned by TimeZone::createDefault().
859
+ *
860
+ * @return The time zone object which was associated with this calendar.
861
+ * @stable ICU 2.0
862
+ */
863
+ TimeZone* orphanTimeZone();
864
+
865
+ /**
866
+ * Queries if the current date for this Calendar is in Daylight Savings Time.
867
+ *
868
+ * @param status Fill-in parameter which receives the status of this operation.
869
+ * @return True if the current date for this Calendar is in Daylight Savings Time,
870
+ * false, otherwise.
871
+ * @stable ICU 2.0
872
+ */
873
+ virtual UBool inDaylightTime(UErrorCode& status) const;
874
+
875
+ /**
876
+ * Specifies whether or not date/time interpretation is to be lenient. With lenient
877
+ * interpretation, a date such as "February 942, 1996" will be treated as being
878
+ * equivalent to the 941st day after February 1, 1996. With strict interpretation,
879
+ * such dates will cause an error when computing time from the time field values
880
+ * representing the dates.
881
+ *
882
+ * @param lenient True specifies date/time interpretation to be lenient.
883
+ *
884
+ * @see DateFormat#setLenient
885
+ * @stable ICU 2.0
886
+ */
887
+ void setLenient(UBool lenient);
888
+
889
+ /**
890
+ * Tells whether date/time interpretation is to be lenient.
891
+ *
892
+ * @return True tells that date/time interpretation is to be lenient.
893
+ * @stable ICU 2.0
894
+ */
895
+ UBool isLenient() const;
896
+
897
+ /**
898
+ * Sets the behavior for handling wall time repeating multiple times
899
+ * at negative time zone offset transitions. For example, 1:30 AM on
900
+ * November 6, 2011 in US Eastern time (America/New_York) occurs twice;
901
+ * 1:30 AM EDT, then 1:30 AM EST one hour later. When <code>UCAL_WALLTIME_FIRST</code>
902
+ * is used, the wall time 1:30AM in this example will be interpreted as 1:30 AM EDT
903
+ * (first occurrence). When <code>UCAL_WALLTIME_LAST</code> is used, it will be
904
+ * interpreted as 1:30 AM EST (last occurrence). The default value is
905
+ * <code>UCAL_WALLTIME_LAST</code>.
906
+ * <p>
907
+ * <b>Note:</b>When <code>UCAL_WALLTIME_NEXT_VALID</code> is not a valid
908
+ * option for this. When the argument is neither <code>UCAL_WALLTIME_FIRST</code>
909
+ * nor <code>UCAL_WALLTIME_LAST</code>, this method has no effect and will keep
910
+ * the current setting.
911
+ *
912
+ * @param option the behavior for handling repeating wall time, either
913
+ * <code>UCAL_WALLTIME_FIRST</code> or <code>UCAL_WALLTIME_LAST</code>.
914
+ * @see #getRepeatedWallTimeOption
915
+ * @stable ICU 49
916
+ */
917
+ void setRepeatedWallTimeOption(UCalendarWallTimeOption option);
918
+
919
+ /**
920
+ * Gets the behavior for handling wall time repeating multiple times
921
+ * at negative time zone offset transitions.
922
+ *
923
+ * @return the behavior for handling repeating wall time, either
924
+ * <code>UCAL_WALLTIME_FIRST</code> or <code>UCAL_WALLTIME_LAST</code>.
925
+ * @see #setRepeatedWallTimeOption
926
+ * @stable ICU 49
927
+ */
928
+ UCalendarWallTimeOption getRepeatedWallTimeOption() const;
929
+
930
+ /**
931
+ * Sets the behavior for handling skipped wall time at positive time zone offset
932
+ * transitions. For example, 2:30 AM on March 13, 2011 in US Eastern time (America/New_York)
933
+ * does not exist because the wall time jump from 1:59 AM EST to 3:00 AM EDT. When
934
+ * <code>UCAL_WALLTIME_FIRST</code> is used, 2:30 AM is interpreted as 30 minutes before 3:00 AM
935
+ * EDT, therefore, it will be resolved as 1:30 AM EST. When <code>UCAL_WALLTIME_LAST</code>
936
+ * is used, 2:30 AM is interpreted as 31 minutes after 1:59 AM EST, therefore, it will be
937
+ * resolved as 3:30 AM EDT. When <code>UCAL_WALLTIME_NEXT_VALID</code> is used, 2:30 AM will
938
+ * be resolved as next valid wall time, that is 3:00 AM EDT. The default value is
939
+ * <code>UCAL_WALLTIME_LAST</code>.
940
+ * <p>
941
+ * <b>Note:</b>This option is effective only when this calendar is lenient.
942
+ * When the calendar is strict, such non-existing wall time will cause an error.
943
+ *
944
+ * @param option the behavior for handling skipped wall time at positive time zone
945
+ * offset transitions, one of <code>UCAL_WALLTIME_FIRST</code>, <code>UCAL_WALLTIME_LAST</code> and
946
+ * <code>UCAL_WALLTIME_NEXT_VALID</code>.
947
+ * @see #getSkippedWallTimeOption
948
+ *
949
+ * @stable ICU 49
950
+ */
951
+ void setSkippedWallTimeOption(UCalendarWallTimeOption option);
952
+
953
+ /**
954
+ * Gets the behavior for handling skipped wall time at positive time zone offset
955
+ * transitions.
956
+ *
957
+ * @return the behavior for handling skipped wall time, one of
958
+ * <code>UCAL_WALLTIME_FIRST</code>, <code>UCAL_WALLTIME_LAST</code>
959
+ * and <code>UCAL_WALLTIME_NEXT_VALID</code>.
960
+ * @see #setSkippedWallTimeOption
961
+ * @stable ICU 49
962
+ */
963
+ UCalendarWallTimeOption getSkippedWallTimeOption() const;
964
+
965
+ /**
966
+ * Sets what the first day of the week is; e.g., Sunday in US, Monday in France.
967
+ *
968
+ * @param value The given first day of the week.
969
+ * @stable ICU 2.6.
970
+ */
971
+ void setFirstDayOfWeek(UCalendarDaysOfWeek value);
972
+
973
+ #ifndef U_HIDE_DEPRECATED_API
974
+ /**
975
+ * Gets what the first day of the week is; e.g., Sunday in US, Monday in France.
976
+ *
977
+ * @return The first day of the week.
978
+ * @deprecated ICU 2.6 use the overload with error code
979
+ */
980
+ EDaysOfWeek getFirstDayOfWeek() const;
981
+ #endif /* U_HIDE_DEPRECATED_API */
982
+
983
+ /**
984
+ * Gets what the first day of the week is; e.g., Sunday in US, Monday in France.
985
+ *
986
+ * @param status error code
987
+ * @return The first day of the week.
988
+ * @stable ICU 2.6
989
+ */
990
+ UCalendarDaysOfWeek getFirstDayOfWeek(UErrorCode &status) const;
991
+
992
+ /**
993
+ * Sets what the minimal days required in the first week of the year are; For
994
+ * example, if the first week is defined as one that contains the first day of the
995
+ * first month of a year, call the method with value 1. If it must be a full week,
996
+ * use value 7.
997
+ *
998
+ * @param value The given minimal days required in the first week of the year.
999
+ * @stable ICU 2.0
1000
+ */
1001
+ void setMinimalDaysInFirstWeek(uint8_t value);
1002
+
1003
+ /**
1004
+ * Gets what the minimal days required in the first week of the year are; e.g., if
1005
+ * the first week is defined as one that contains the first day of the first month
1006
+ * of a year, getMinimalDaysInFirstWeek returns 1. If the minimal days required must
1007
+ * be a full week, getMinimalDaysInFirstWeek returns 7.
1008
+ *
1009
+ * @return The minimal days required in the first week of the year.
1010
+ * @stable ICU 2.0
1011
+ */
1012
+ uint8_t getMinimalDaysInFirstWeek() const;
1013
+
1014
+ #ifndef U_FORCE_HIDE_DEPRECATED_API
1015
+ /**
1016
+ * Gets the minimum value for the given time field. e.g., for Gregorian
1017
+ * DAY_OF_MONTH, 1.
1018
+ *
1019
+ * @param field The given time field.
1020
+ * @return The minimum value for the given time field.
1021
+ * @deprecated ICU 2.6. Use getMinimum(UCalendarDateFields field) instead.
1022
+ */
1023
+ virtual int32_t getMinimum(EDateFields field) const;
1024
+ #endif // U_FORCE_HIDE_DEPRECATED_API
1025
+
1026
+ /**
1027
+ * Gets the minimum value for the given time field. e.g., for Gregorian
1028
+ * DAY_OF_MONTH, 1.
1029
+ *
1030
+ * @param field The given time field.
1031
+ * @return The minimum value for the given time field.
1032
+ * @stable ICU 2.6.
1033
+ */
1034
+ virtual int32_t getMinimum(UCalendarDateFields field) const;
1035
+
1036
+ #ifndef U_FORCE_HIDE_DEPRECATED_API
1037
+ /**
1038
+ * Gets the maximum value for the given time field. e.g. for Gregorian DAY_OF_MONTH,
1039
+ * 31.
1040
+ *
1041
+ * @param field The given time field.
1042
+ * @return The maximum value for the given time field.
1043
+ * @deprecated ICU 2.6. Use getMaximum(UCalendarDateFields field) instead.
1044
+ */
1045
+ virtual int32_t getMaximum(EDateFields field) const;
1046
+ #endif // U_FORCE_HIDE_DEPRECATED_API
1047
+
1048
+ /**
1049
+ * Gets the maximum value for the given time field. e.g. for Gregorian DAY_OF_MONTH,
1050
+ * 31.
1051
+ *
1052
+ * @param field The given time field.
1053
+ * @return The maximum value for the given time field.
1054
+ * @stable ICU 2.6.
1055
+ */
1056
+ virtual int32_t getMaximum(UCalendarDateFields field) const;
1057
+
1058
+ #ifndef U_FORCE_HIDE_DEPRECATED_API
1059
+ /**
1060
+ * Gets the highest minimum value for the given field if varies. Otherwise same as
1061
+ * getMinimum(). For Gregorian, no difference.
1062
+ *
1063
+ * @param field The given time field.
1064
+ * @return The highest minimum value for the given time field.
1065
+ * @deprecated ICU 2.6. Use getGreatestMinimum(UCalendarDateFields field) instead.
1066
+ */
1067
+ virtual int32_t getGreatestMinimum(EDateFields field) const;
1068
+ #endif // U_FORCE_HIDE_DEPRECATED_API
1069
+
1070
+ /**
1071
+ * Gets the highest minimum value for the given field if varies. Otherwise same as
1072
+ * getMinimum(). For Gregorian, no difference.
1073
+ *
1074
+ * @param field The given time field.
1075
+ * @return The highest minimum value for the given time field.
1076
+ * @stable ICU 2.6.
1077
+ */
1078
+ virtual int32_t getGreatestMinimum(UCalendarDateFields field) const;
1079
+
1080
+ #ifndef U_FORCE_HIDE_DEPRECATED_API
1081
+ /**
1082
+ * Gets the lowest maximum value for the given field if varies. Otherwise same as
1083
+ * getMaximum(). e.g., for Gregorian DAY_OF_MONTH, 28.
1084
+ *
1085
+ * @param field The given time field.
1086
+ * @return The lowest maximum value for the given time field.
1087
+ * @deprecated ICU 2.6. Use getLeastMaximum(UCalendarDateFields field) instead.
1088
+ */
1089
+ virtual int32_t getLeastMaximum(EDateFields field) const;
1090
+ #endif // U_FORCE_HIDE_DEPRECATED_API
1091
+
1092
+ /**
1093
+ * Gets the lowest maximum value for the given field if varies. Otherwise same as
1094
+ * getMaximum(). e.g., for Gregorian DAY_OF_MONTH, 28.
1095
+ *
1096
+ * @param field The given time field.
1097
+ * @return The lowest maximum value for the given time field.
1098
+ * @stable ICU 2.6.
1099
+ */
1100
+ virtual int32_t getLeastMaximum(UCalendarDateFields field) const;
1101
+
1102
+ #ifndef U_HIDE_DEPRECATED_API
1103
+ /**
1104
+ * Return the minimum value that this field could have, given the current date.
1105
+ * For the Gregorian calendar, this is the same as getMinimum() and getGreatestMinimum().
1106
+ *
1107
+ * The version of this function on Calendar uses an iterative algorithm to determine the
1108
+ * actual minimum value for the field. There is almost always a more efficient way to
1109
+ * accomplish this (in most cases, you can simply return getMinimum()). GregorianCalendar
1110
+ * overrides this function with a more efficient implementation.
1111
+ *
1112
+ * @param field the field to determine the minimum of
1113
+ * @param status Fill-in parameter which receives the status of this operation.
1114
+ * @return the minimum of the given field for the current date of this Calendar
1115
+ * @deprecated ICU 2.6. Use getActualMinimum(UCalendarDateFields field, UErrorCode& status) instead.
1116
+ */
1117
+ int32_t getActualMinimum(EDateFields field, UErrorCode& status) const;
1118
+ #endif /* U_HIDE_DEPRECATED_API */
1119
+
1120
+ /**
1121
+ * Return the minimum value that this field could have, given the current date.
1122
+ * For the Gregorian calendar, this is the same as getMinimum() and getGreatestMinimum().
1123
+ *
1124
+ * The version of this function on Calendar uses an iterative algorithm to determine the
1125
+ * actual minimum value for the field. There is almost always a more efficient way to
1126
+ * accomplish this (in most cases, you can simply return getMinimum()). GregorianCalendar
1127
+ * overrides this function with a more efficient implementation.
1128
+ *
1129
+ * @param field the field to determine the minimum of
1130
+ * @param status Fill-in parameter which receives the status of this operation.
1131
+ * @return the minimum of the given field for the current date of this Calendar
1132
+ * @stable ICU 2.6.
1133
+ */
1134
+ virtual int32_t getActualMinimum(UCalendarDateFields field, UErrorCode& status) const;
1135
+
1136
+ /**
1137
+ * Return the maximum value that this field could have, given the current date.
1138
+ * For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual
1139
+ * maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Hebrew calendar,
1140
+ * for some years the actual maximum for MONTH is 12, and for others 13.
1141
+ *
1142
+ * The version of this function on Calendar uses an iterative algorithm to determine the
1143
+ * actual maximum value for the field. There is almost always a more efficient way to
1144
+ * accomplish this (in most cases, you can simply return getMaximum()). GregorianCalendar
1145
+ * overrides this function with a more efficient implementation.
1146
+ *
1147
+ * @param field the field to determine the maximum of
1148
+ * @param status Fill-in parameter which receives the status of this operation.
1149
+ * @return the maximum of the given field for the current date of this Calendar
1150
+ * @stable ICU 2.6.
1151
+ */
1152
+ virtual int32_t getActualMaximum(UCalendarDateFields field, UErrorCode& status) const;
1153
+
1154
+ /**
1155
+ * Gets the value for a given time field. Recalculate the current time field values
1156
+ * if the time value has been changed by a call to setTime(). Return zero for unset
1157
+ * fields if any fields have been explicitly set by a call to set(). To force a
1158
+ * recomputation of all fields regardless of the previous state, call complete().
1159
+ * This method is semantically const, but may alter the object in memory.
1160
+ *
1161
+ * @param field The given time field.
1162
+ * @param status Fill-in parameter which receives the status of the operation.
1163
+ * @return The value for the given time field, or zero if the field is unset,
1164
+ * and set() has been called for any other field.
1165
+ * @stable ICU 2.6.
1166
+ */
1167
+ int32_t get(UCalendarDateFields field, UErrorCode& status) const;
1168
+
1169
+ /**
1170
+ * Determines if the given time field has a value set. This can affect in the
1171
+ * resolving of time in Calendar. Unset fields have a value of zero, by definition.
1172
+ *
1173
+ * @param field The given time field.
1174
+ * @return True if the given time field has a value set; false otherwise.
1175
+ * @stable ICU 2.6.
1176
+ */
1177
+ UBool isSet(UCalendarDateFields field) const;
1178
+
1179
+ /**
1180
+ * Sets the given time field with the given value.
1181
+ *
1182
+ * @param field The given time field.
1183
+ * @param value The value to be set for the given time field.
1184
+ * @stable ICU 2.6.
1185
+ */
1186
+ void set(UCalendarDateFields field, int32_t value);
1187
+
1188
+ /**
1189
+ * Sets the values for the fields YEAR, MONTH, and DATE. Other field values are
1190
+ * retained; call clear() first if this is not desired.
1191
+ *
1192
+ * @param year The value used to set the YEAR time field.
1193
+ * @param month The value used to set the MONTH time field. Month value is 0-based.
1194
+ * e.g., 0 for January.
1195
+ * @param date The value used to set the DATE time field.
1196
+ * @stable ICU 2.0
1197
+ */
1198
+ void set(int32_t year, int32_t month, int32_t date);
1199
+
1200
+ /**
1201
+ * Sets the values for the fields YEAR, MONTH, DATE, HOUR_OF_DAY, and MINUTE. Other
1202
+ * field values are retained; call clear() first if this is not desired.
1203
+ *
1204
+ * @param year The value used to set the YEAR time field.
1205
+ * @param month The value used to set the MONTH time field. Month value is
1206
+ * 0-based. E.g., 0 for January.
1207
+ * @param date The value used to set the DATE time field.
1208
+ * @param hour The value used to set the HOUR_OF_DAY time field.
1209
+ * @param minute The value used to set the MINUTE time field.
1210
+ * @stable ICU 2.0
1211
+ */
1212
+ void set(int32_t year, int32_t month, int32_t date, int32_t hour, int32_t minute);
1213
+
1214
+ /**
1215
+ * Sets the values for the fields YEAR, MONTH, DATE, HOUR_OF_DAY, MINUTE, and SECOND.
1216
+ * Other field values are retained; call clear() first if this is not desired.
1217
+ *
1218
+ * @param year The value used to set the YEAR time field.
1219
+ * @param month The value used to set the MONTH time field. Month value is
1220
+ * 0-based. E.g., 0 for January.
1221
+ * @param date The value used to set the DATE time field.
1222
+ * @param hour The value used to set the HOUR_OF_DAY time field.
1223
+ * @param minute The value used to set the MINUTE time field.
1224
+ * @param second The value used to set the SECOND time field.
1225
+ * @stable ICU 2.0
1226
+ */
1227
+ void set(int32_t year, int32_t month, int32_t date, int32_t hour, int32_t minute, int32_t second);
1228
+
1229
+ /**
1230
+ * Clears the values of all the time fields, making them both unset and assigning
1231
+ * them a value of zero. The field values will be determined during the next
1232
+ * resolving of time into time fields.
1233
+ *
1234
+ * Apple ICU description per
1235
+ * rdar://14271954 518a7e70de.. When resolving fields, explicit day + month should outweigh later explicit weekday + implicit fields:
1236
+ * Clears the values of all the time fields, making them both unset and assigning
1237
+ * them a value of zero (except for era in some cases, see below). The field values
1238
+ * will be determined during the next resolving of time into time fields.
1239
+ *
1240
+ * This effectively results in the following:
1241
+ * 1. Gregorian-like calendars (gregorian, iso8601, japanese, buddhist, roc) are set
1242
+ * to a UDate value of 0, corresponding to the epoch date of gregorian
1243
+ * January 1, 1970 CE at UTC 00:00:00.
1244
+ * 2. Other calendars are set to the beginning of the first day of the first month of
1245
+ * the current era. Note that for the chinese and dangi calendars, the era
1246
+ * corresponds to the current 60-year stem-branch cycle, so there is a new era
1247
+ * every 60 years. The current era began on gregorian February 2, 1984.
1248
+ *
1249
+ * @stable ICU 2.0
1250
+ */
1251
+ void clear();
1252
+
1253
+ /**
1254
+ * Clears the value in the given time field, both making it unset and assigning it a
1255
+ * value of zero. This field value will be determined during the next resolving of
1256
+ * time into time fields. Clearing UCAL_ORDINAL_MONTH or UCAL_MONTH will
1257
+ * clear both fields.
1258
+ *
1259
+ * @param field The time field to be cleared.
1260
+ * @stable ICU 2.6.
1261
+ */
1262
+ void clear(UCalendarDateFields field);
1263
+
1264
+ /**
1265
+ * Returns a unique class ID POLYMORPHICALLY. Pure virtual method. This method is to
1266
+ * implement a simple version of RTTI, since not all C++ compilers support genuine
1267
+ * RTTI. Polymorphic operator==() and clone() methods call this method.
1268
+ * <P>
1269
+ * Concrete subclasses of Calendar must implement getDynamicClassID() and also a
1270
+ * static method and data member:
1271
+ *
1272
+ * static UClassID getStaticClassID() { return (UClassID)&amp;fgClassID; }
1273
+ * static char fgClassID;
1274
+ *
1275
+ * @return The class ID for this object. All objects of a given class have the
1276
+ * same class ID. Objects of other classes have different class IDs.
1277
+ * @stable ICU 2.0
1278
+ */
1279
+ virtual UClassID getDynamicClassID() const override = 0;
1280
+
1281
+ /**
1282
+ * Returns the calendar type name string for this Calendar object.
1283
+ * The returned string is the legacy ICU calendar attribute value,
1284
+ * for example, "gregorian" or "japanese".
1285
+ *
1286
+ * See type="old type name" for the calendar attribute of locale IDs
1287
+ * at http://www.unicode.org/reports/tr35/#Key_Type_Definitions
1288
+ *
1289
+ * Sample code for getting the LDML/BCP 47 calendar key value:
1290
+ * \code
1291
+ * const char *calType = cal->getType();
1292
+ * if (0 == strcmp(calType, "unknown")) {
1293
+ * // deal with unknown calendar type
1294
+ * } else {
1295
+ * string localeID("root@calendar=");
1296
+ * localeID.append(calType);
1297
+ * char langTag[100];
1298
+ * UErrorCode errorCode = U_ZERO_ERROR;
1299
+ * int32_t length = uloc_toLanguageTag(localeID.c_str(), langTag, (int32_t)sizeof(langTag), true, &errorCode);
1300
+ * if (U_FAILURE(errorCode)) {
1301
+ * // deal with errors & overflow
1302
+ * }
1303
+ * string lang(langTag, length);
1304
+ * size_t caPos = lang.find("-ca-");
1305
+ * lang.erase(0, caPos + 4);
1306
+ * // lang now contains the LDML calendar type
1307
+ * }
1308
+ * \endcode
1309
+ *
1310
+ * @return legacy calendar type name string
1311
+ * @stable ICU 49
1312
+ */
1313
+ virtual const char * getType() const = 0;
1314
+
1315
+ /**
1316
+ * Returns whether the given day of the week is a weekday, a weekend day,
1317
+ * or a day that transitions from one to the other, for the locale and
1318
+ * calendar system associated with this Calendar (the locale's region is
1319
+ * often the most determinant factor). If a transition occurs at midnight,
1320
+ * then the days before and after the transition will have the
1321
+ * type UCAL_WEEKDAY or UCAL_WEEKEND. If a transition occurs at a time
1322
+ * other than midnight, then the day of the transition will have
1323
+ * the type UCAL_WEEKEND_ONSET or UCAL_WEEKEND_CEASE. In this case, the
1324
+ * method getWeekendTransition() will return the point of
1325
+ * transition.
1326
+ * @param dayOfWeek The day of the week whose type is desired (UCAL_SUNDAY..UCAL_SATURDAY).
1327
+ * @param status The error code for the operation.
1328
+ * @return The UCalendarWeekdayType for the day of the week.
1329
+ * @stable ICU 4.4
1330
+ */
1331
+ virtual UCalendarWeekdayType getDayOfWeekType(UCalendarDaysOfWeek dayOfWeek, UErrorCode &status) const;
1332
+
1333
+ /**
1334
+ * Returns the time during the day at which the weekend begins or ends in
1335
+ * this calendar system. If getDayOfWeekType() returns UCAL_WEEKEND_ONSET
1336
+ * for the specified dayOfWeek, return the time at which the weekend begins.
1337
+ * If getDayOfWeekType() returns UCAL_WEEKEND_CEASE for the specified dayOfWeek,
1338
+ * return the time at which the weekend ends. If getDayOfWeekType() returns
1339
+ * some other UCalendarWeekdayType for the specified dayOfWeek, is it an error condition
1340
+ * (U_ILLEGAL_ARGUMENT_ERROR).
1341
+ * @param dayOfWeek The day of the week for which the weekend transition time is
1342
+ * desired (UCAL_SUNDAY..UCAL_SATURDAY).
1343
+ * @param status The error code for the operation.
1344
+ * @return The milliseconds after midnight at which the weekend begins or ends.
1345
+ * @stable ICU 4.4
1346
+ */
1347
+ virtual int32_t getWeekendTransition(UCalendarDaysOfWeek dayOfWeek, UErrorCode &status) const;
1348
+
1349
+ /**
1350
+ * Returns true if the given UDate is in the weekend in
1351
+ * this calendar system.
1352
+ * @param date The UDate in question.
1353
+ * @param status The error code for the operation.
1354
+ * @return true if the given UDate is in the weekend in
1355
+ * this calendar system, false otherwise.
1356
+ * @stable ICU 4.4
1357
+ */
1358
+ virtual UBool isWeekend(UDate date, UErrorCode &status) const;
1359
+
1360
+ /**
1361
+ * Returns true if this Calendar's current date-time is in the weekend in
1362
+ * this calendar system.
1363
+ * @return true if this Calendar's current date-time is in the weekend in
1364
+ * this calendar system, false otherwise.
1365
+ * @stable ICU 4.4
1366
+ */
1367
+ virtual UBool isWeekend() const;
1368
+
1369
+ /**
1370
+ * Returns true if the date is in a leap year. Recalculate the current time
1371
+ * field values if the time value has been changed by a call to * setTime().
1372
+ * This method is semantically const, but may alter the object in memory.
1373
+ * A "leap year" is a year that contains more days than other years (for
1374
+ * solar or lunar calendars) or more months than other years (for lunisolar
1375
+ * calendars like Hebrew or Chinese), as defined in the ECMAScript Temporal
1376
+ * proposal.
1377
+ *
1378
+ * @param status ICU Error Code
1379
+ * @return True if the date in the fields is in a Temporal proposal
1380
+ * defined leap year. False otherwise.
1381
+ * @stable ICU 73
1382
+ */
1383
+ virtual bool inTemporalLeapYear(UErrorCode& status) const;
1384
+
1385
+ /**
1386
+ * Gets The Temporal monthCode value corresponding to the month for the date.
1387
+ * The value is a string identifier that starts with the literal grapheme
1388
+ * "M" followed by two graphemes representing the zero-padded month number
1389
+ * of the current month in a normal (non-leap) year and suffixed by an
1390
+ * optional literal grapheme "L" if this is a leap month in a lunisolar
1391
+ * calendar. The 25 possible values are "M01" .. "M13" and "M01L" .. "M12L".
1392
+ * For the Hebrew calendar, the values are "M01" .. "M12" for non-leap year, and
1393
+ * "M01" .. "M05", "M05L", "M06" .. "M12" for leap year.
1394
+ * For the Chinese calendar, the values are "M01" .. "M12" for non-leap year and
1395
+ * in leap year with another monthCode in "M01L" .. "M12L".
1396
+ * For Coptic and Ethiopian calendar, the Temporal monthCode values for any
1397
+ * years are "M01" to "M13".
1398
+ *
1399
+ * @param status ICU Error Code
1400
+ * @return One of 25 possible strings in {"M01".."M13", "M01L".."M12L"}.
1401
+ * @stable ICU 73
1402
+ */
1403
+ virtual const char* getTemporalMonthCode(UErrorCode& status) const;
1404
+
1405
+ /**
1406
+ * Sets The Temporal monthCode which is a string identifier that starts
1407
+ * with the literal grapheme "M" followed by two graphemes representing
1408
+ * the zero-padded month number of the current month in a normal
1409
+ * (non-leap) year and suffixed by an optional literal grapheme "L" if this
1410
+ * is a leap month in a lunisolar calendar. The 25 possible values are
1411
+ * "M01" .. "M13" and "M01L" .. "M12L". For Hebrew calendar, the values are
1412
+ * "M01" .. "M12" for non-leap years, and "M01" .. "M05", "M05L", "M06"
1413
+ * .. "M12" for leap year.
1414
+ * For the Chinese calendar, the values are "M01" .. "M12" for non-leap year and
1415
+ * in leap year with another monthCode in "M01L" .. "M12L".
1416
+ * For Coptic and Ethiopian calendar, the Temporal monthCode values for any
1417
+ * years are "M01" to "M13".
1418
+ *
1419
+ * @param temporalMonth The value to be set for temporal monthCode.
1420
+ * @param status ICU Error Code
1421
+ *
1422
+ * @stable ICU 73
1423
+ */
1424
+ virtual void setTemporalMonthCode(const char* temporalMonth, UErrorCode& status);
1425
+
1426
+ protected:
1427
+
1428
+ /**
1429
+ * Constructs a Calendar with the default time zone as returned by
1430
+ * TimeZone::createInstance(), and the default locale.
1431
+ *
1432
+ * @param success Indicates the status of Calendar object construction. Returns
1433
+ * U_ZERO_ERROR if constructed successfully.
1434
+ * @stable ICU 2.0
1435
+ */
1436
+ Calendar(UErrorCode& success);
1437
+
1438
+ /**
1439
+ * Copy constructor
1440
+ *
1441
+ * @param source Calendar object to be copied from
1442
+ * @stable ICU 2.0
1443
+ */
1444
+ Calendar(const Calendar& source);
1445
+
1446
+ /**
1447
+ * Default assignment operator
1448
+ *
1449
+ * @param right Calendar object to be copied
1450
+ * @stable ICU 2.0
1451
+ */
1452
+ Calendar& operator=(const Calendar& right);
1453
+
1454
+ /**
1455
+ * Constructs a Calendar with the given time zone and locale. Clients are no longer
1456
+ * responsible for deleting the given time zone object after it's adopted.
1457
+ *
1458
+ * @param zone The given time zone.
1459
+ * @param aLocale The given locale.
1460
+ * @param success Indicates the status of Calendar object construction. Returns
1461
+ * U_ZERO_ERROR if constructed successfully.
1462
+ * @stable ICU 2.0
1463
+ */
1464
+ Calendar(TimeZone* zone, const Locale& aLocale, UErrorCode& success);
1465
+
1466
+ /**
1467
+ * Constructs a Calendar with the given time zone and locale.
1468
+ *
1469
+ * @param zone The given time zone.
1470
+ * @param aLocale The given locale.
1471
+ * @param success Indicates the status of Calendar object construction. Returns
1472
+ * U_ZERO_ERROR if constructed successfully.
1473
+ * @stable ICU 2.0
1474
+ */
1475
+ Calendar(const TimeZone& zone, const Locale& aLocale, UErrorCode& success);
1476
+
1477
+ /**
1478
+ * Converts Calendar's time field values to GMT as milliseconds.
1479
+ *
1480
+ * @param status Output param set to success/failure code on exit. If any value
1481
+ * previously set in the time field is invalid or restricted by
1482
+ * leniency, this will be set to an error status.
1483
+ * @stable ICU 2.0
1484
+ */
1485
+ virtual void computeTime(UErrorCode& status);
1486
+
1487
+ /**
1488
+ * Converts GMT as milliseconds to time field values. This allows you to sync up the
1489
+ * time field values with a new time that is set for the calendar. This method
1490
+ * does NOT recompute the time first; to recompute the time, then the fields, use
1491
+ * the method complete().
1492
+ *
1493
+ * @param status Output param set to success/failure code on exit. If any value
1494
+ * previously set in the time field is invalid or restricted by
1495
+ * leniency, this will be set to an error status.
1496
+ * @stable ICU 2.0
1497
+ */
1498
+ virtual void computeFields(UErrorCode& status);
1499
+
1500
+ /**
1501
+ * Gets this Calendar's current time as a long.
1502
+ *
1503
+ * @param status Output param set to success/failure code on exit. If any value
1504
+ * previously set in the time field is invalid or restricted by
1505
+ * leniency, this will be set to an error status.
1506
+ * @return the current time as UTC milliseconds from the epoch.
1507
+ * @stable ICU 2.0
1508
+ */
1509
+ double getTimeInMillis(UErrorCode& status) const;
1510
+
1511
+ /**
1512
+ * Sets this Calendar's current time from the given long value.
1513
+ * @param millis the new time in UTC milliseconds from the epoch.
1514
+ * @param status Output param set to success/failure code on exit. If any value
1515
+ * previously set in the time field is invalid or restricted by
1516
+ * leniency, this will be set to an error status.
1517
+ * @stable ICU 2.0
1518
+ */
1519
+ void setTimeInMillis( double millis, UErrorCode& status );
1520
+
1521
+ /**
1522
+ * Recomputes the current time from currently set fields, and then fills in any
1523
+ * unset fields in the time field list.
1524
+ *
1525
+ * @param status Output param set to success/failure code on exit. If any value
1526
+ * previously set in the time field is invalid or restricted by
1527
+ * leniency, this will be set to an error status.
1528
+ * @stable ICU 2.0
1529
+ */
1530
+ void complete(UErrorCode& status);
1531
+
1532
+ #ifndef U_HIDE_DEPRECATED_API
1533
+ /**
1534
+ * Gets the value for a given time field. Subclasses can use this function to get
1535
+ * field values without forcing recomputation of time.
1536
+ *
1537
+ * @param field The given time field.
1538
+ * @return The value for the given time field.
1539
+ * @deprecated ICU 2.6. Use internalGet(UCalendarDateFields field) instead.
1540
+ */
1541
+ inline int32_t internalGet(EDateFields field) const {return fFields[field];}
1542
+ #endif /* U_HIDE_DEPRECATED_API */
1543
+
1544
+ #ifndef U_HIDE_INTERNAL_API
1545
+ /**
1546
+ * Gets the value for a given time field. Subclasses can use this function to get
1547
+ * field values without forcing recomputation of time. If the field's stamp is UNSET,
1548
+ * the defaultValue is used.
1549
+ *
1550
+ * @param field The given time field.
1551
+ * @param defaultValue a default value used if the field is unset.
1552
+ * @return The value for the given time field.
1553
+ * @internal
1554
+ */
1555
+ inline int32_t internalGet(UCalendarDateFields field, int32_t defaultValue) const {return fStamp[field]>kUnset ? fFields[field] : defaultValue;}
1556
+
1557
+ /**
1558
+ * Gets the value for a given time field. Subclasses can use this function to get
1559
+ * field values without forcing recomputation of time.
1560
+ *
1561
+ * @param field The given time field.
1562
+ * @return The value for the given time field.
1563
+ * @internal
1564
+ */
1565
+ inline int32_t internalGet(UCalendarDateFields field) const {return fFields[field];}
1566
+
1567
+ /**
1568
+ * The year in this calendar is counting from 1 backward if the era is 0.
1569
+ * @return The year in era 0 of this calendar is counting backward from 1.
1570
+ * @internal
1571
+ */
1572
+ virtual bool isEra0CountingBackward() const { return false; }
1573
+ #endif /* U_HIDE_INTERNAL_API */
1574
+
1575
+ /**
1576
+ * Use this function instead of internalGet(UCAL_MONTH). The implementation
1577
+ * check the timestamp of UCAL_MONTH and UCAL_ORDINAL_MONTH and use the
1578
+ * one set later. The subclass should override it to conver the value of UCAL_ORDINAL_MONTH
1579
+ * to UCAL_MONTH correctly if UCAL_ORDINAL_MONTH has higher priority.
1580
+ *
1581
+ * @return The value for the UCAL_MONTH.
1582
+ * @internal
1583
+ */
1584
+ virtual int32_t internalGetMonth(UErrorCode& status) const;
1585
+
1586
+ /**
1587
+ * Use this function instead of internalGet(UCAL_MONTH, defaultValue). The implementation
1588
+ * check the timestamp of UCAL_MONTH and UCAL_ORDINAL_MONTH and use the
1589
+ * one set later. The subclass should override it to conver the value of UCAL_ORDINAL_MONTH
1590
+ * to UCAL_MONTH correctly if UCAL_ORDINAL_MONTH has higher priority.
1591
+ *
1592
+ * @param defaultValue a default value used if the UCAL_MONTH and
1593
+ * UCAL_ORDINAL are both unset.
1594
+ * @param status Output param set to failure code on function return
1595
+ * when this function fails.
1596
+ * @return The value for the UCAL_MONTH.
1597
+ * @internal
1598
+ */
1599
+ virtual int32_t internalGetMonth(int32_t defaultValue, UErrorCode& status) const;
1600
+
1601
+ #ifndef U_HIDE_DEPRECATED_API
1602
+ /**
1603
+ * Sets the value for a given time field. This is a fast internal method for
1604
+ * subclasses. It does not affect the areFieldsInSync, isTimeSet, or areAllFieldsSet
1605
+ * flags.
1606
+ *
1607
+ * @param field The given time field.
1608
+ * @param value The value for the given time field.
1609
+ * @deprecated ICU 2.6. Use internalSet(UCalendarDateFields field, int32_t value) instead.
1610
+ */
1611
+ void internalSet(EDateFields field, int32_t value);
1612
+ #endif /* U_HIDE_DEPRECATED_API */
1613
+
1614
+ /**
1615
+ * Sets the value for a given time field. This is a fast internal method for
1616
+ * subclasses. It does not affect the areFieldsInSync, isTimeSet, or areAllFieldsSet
1617
+ * flags.
1618
+ *
1619
+ * @param field The given time field.
1620
+ * @param value The value for the given time field.
1621
+ * @stable ICU 2.6.
1622
+ */
1623
+ inline void internalSet(UCalendarDateFields field, int32_t value);
1624
+
1625
+ /**
1626
+ * Prepare this calendar for computing the actual minimum or maximum.
1627
+ * This method modifies this calendar's fields; it is called on a
1628
+ * temporary calendar.
1629
+ * @internal
1630
+ */
1631
+ virtual void prepareGetActual(UCalendarDateFields field, UBool isMinimum, UErrorCode &status);
1632
+
1633
+ /**
1634
+ * Limit enums. Not in sync with UCalendarLimitType (refers to internal fields).
1635
+ * @internal
1636
+ */
1637
+ enum ELimitType {
1638
+ #ifndef U_HIDE_INTERNAL_API
1639
+ UCAL_LIMIT_MINIMUM = 0,
1640
+ UCAL_LIMIT_GREATEST_MINIMUM,
1641
+ UCAL_LIMIT_LEAST_MAXIMUM,
1642
+ UCAL_LIMIT_MAXIMUM,
1643
+ UCAL_LIMIT_COUNT
1644
+ #endif /* U_HIDE_INTERNAL_API */
1645
+ };
1646
+
1647
+ /**
1648
+ * Subclass API for defining limits of different types.
1649
+ * Subclasses must implement this method to return limits for the
1650
+ * following fields:
1651
+ *
1652
+ * <pre>UCAL_ERA
1653
+ * UCAL_YEAR
1654
+ * UCAL_MONTH
1655
+ * UCAL_WEEK_OF_YEAR
1656
+ * UCAL_WEEK_OF_MONTH
1657
+ * UCAL_DATE (DAY_OF_MONTH on Java)
1658
+ * UCAL_DAY_OF_YEAR
1659
+ * UCAL_DAY_OF_WEEK_IN_MONTH
1660
+ * UCAL_YEAR_WOY
1661
+ * UCAL_EXTENDED_YEAR</pre>
1662
+ *
1663
+ * @param field one of the above field numbers
1664
+ * @param limitType one of <code>MINIMUM</code>, <code>GREATEST_MINIMUM</code>,
1665
+ * <code>LEAST_MAXIMUM</code>, or <code>MAXIMUM</code>
1666
+ * @internal
1667
+ */
1668
+ virtual int32_t handleGetLimit(UCalendarDateFields field, ELimitType limitType) const = 0;
1669
+
1670
+ /**
1671
+ * Return a limit for a field.
1672
+ * @param field the field, from <code>0..UCAL_MAX_FIELD</code>
1673
+ * @param limitType the type specifier for the limit
1674
+ * @see #ELimitType
1675
+ * @internal
1676
+ */
1677
+ virtual int32_t getLimit(UCalendarDateFields field, ELimitType limitType) const;
1678
+
1679
+ /**
1680
+ * Return the Julian day number of day before the first day of the
1681
+ * given month in the given extended year. Subclasses should override
1682
+ * this method to implement their calendar system.
1683
+ * @param eyear the extended year
1684
+ * @param month the zero-based month, or 0 if useMonth is false
1685
+ * @param useMonth if false, compute the day before the first day of
1686
+ * the given year, otherwise, compute the day before the first day of
1687
+ * the given month
1688
+ * @param status Output param set to failure code on function return
1689
+ * when this function fails.
1690
+ * @return the Julian day number of the day before the first
1691
+ * day of the given month and year
1692
+ * @internal
1693
+ */
1694
+ virtual int64_t handleComputeMonthStart(int32_t eyear, int32_t month,
1695
+ UBool useMonth, UErrorCode& status) const = 0;
1696
+
1697
+ /**
1698
+ * Return the number of days in the given month of the given extended
1699
+ * year of this calendar system. Subclasses should override this
1700
+ * method if they can provide a more correct or more efficient
1701
+ * implementation than the default implementation in Calendar.
1702
+ * @internal
1703
+ */
1704
+ virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month, UErrorCode& status) const ;
1705
+
1706
+ /**
1707
+ * Return the number of days in the given extended year of this
1708
+ * calendar system. Subclasses should override this method if they can
1709
+ * provide a more correct or more efficient implementation than the
1710
+ * default implementation in Calendar.
1711
+ * @stable ICU 2.0
1712
+ */
1713
+ virtual int32_t handleGetYearLength(int32_t eyear) const;
1714
+
1715
+
1716
+ /**
1717
+ * Return the extended year defined by the current fields. This will
1718
+ * use the UCAL_EXTENDED_YEAR field or the UCAL_YEAR and supra-year fields (such
1719
+ * as UCAL_ERA) specific to the calendar system, depending on which set of
1720
+ * fields is newer.
1721
+ * @param status ICU Error Code
1722
+ * @return the extended year
1723
+ * @internal
1724
+ */
1725
+ virtual int32_t handleGetExtendedYear(UErrorCode& status) = 0;
1726
+
1727
+ /**
1728
+ * Subclasses may override this. This method calls
1729
+ * handleGetMonthLength() to obtain the calendar-specific month
1730
+ * length.
1731
+ * @param bestField which field to use to calculate the date
1732
+ * @param status ICU Error Code
1733
+ * @return julian day specified by calendar fields.
1734
+ * @internal
1735
+ */
1736
+ virtual int32_t handleComputeJulianDay(UCalendarDateFields bestField, UErrorCode &status);
1737
+
1738
+ /**
1739
+ * Subclasses must override this to convert from week fields
1740
+ * (YEAR_WOY and WEEK_OF_YEAR) to an extended year in the case
1741
+ * where YEAR, EXTENDED_YEAR are not set.
1742
+ * The Calendar implementation assumes yearWoy is in extended gregorian form
1743
+ * @return the extended year, UCAL_EXTENDED_YEAR
1744
+ * @internal
1745
+ */
1746
+ virtual int32_t handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t woy, UErrorCode& status);
1747
+
1748
+ /**
1749
+ * Validate a single field of this calendar. Subclasses should
1750
+ * override this method to validate any calendar-specific fields.
1751
+ * Generic fields can be handled by `Calendar::validateField()`.
1752
+ * @internal
1753
+ */
1754
+ virtual void validateField(UCalendarDateFields field, UErrorCode &status);
1755
+
1756
+ #ifndef U_HIDE_INTERNAL_API
1757
+ /**
1758
+ * Compute the Julian day from fields. Will determine whether to use
1759
+ * the JULIAN_DAY field directly, or other fields.
1760
+ * @param status ICU Error Code
1761
+ * @return the julian day
1762
+ * @internal
1763
+ */
1764
+ int32_t computeJulianDay(UErrorCode &status);
1765
+
1766
+ /**
1767
+ * Compute the milliseconds in the day from the fields. This is a
1768
+ * value from 0 to 23:59:59.999 inclusive, unless fields are out of
1769
+ * range, in which case it can be an arbitrary value. This value
1770
+ * reflects local zone wall time.
1771
+ * @internal
1772
+ */
1773
+ double computeMillisInDay();
1774
+
1775
+ /**
1776
+ * This method can assume EXTENDED_YEAR has been set.
1777
+ * @param millis milliseconds of the date fields
1778
+ * @param millisInDay milliseconds of the time fields; may be out
1779
+ * or range.
1780
+ * @param ec Output param set to failure code on function return
1781
+ * when this function fails.
1782
+ * @internal
1783
+ */
1784
+ int32_t computeZoneOffset(double millis, double millisInDay, UErrorCode &ec);
1785
+
1786
+
1787
+ /**
1788
+ * Determine the best stamp in a range.
1789
+ * @param start first enum to look at
1790
+ * @param end last enum to look at
1791
+ * @param bestSoFar stamp prior to function call
1792
+ * @return the stamp value of the best stamp
1793
+ * @internal
1794
+ */
1795
+ int32_t newestStamp(UCalendarDateFields start, UCalendarDateFields end, int32_t bestSoFar) const;
1796
+
1797
+ /**
1798
+ * Marker for end of resolve set (row or group). Value for field resolution tables.
1799
+ *
1800
+ * @see #resolveFields
1801
+ * @internal
1802
+ */
1803
+ static constexpr int32_t kResolveSTOP = -1;
1804
+ /**
1805
+ * Value to be bitwised "ORed" against resolve table field values for remapping.
1806
+ * Example: (UCAL_DATE | kResolveRemap) in 1st column will cause 'UCAL_DATE' to be returned,
1807
+ * but will not examine the value of UCAL_DATE.
1808
+ * Value for field resolution tables.
1809
+ *
1810
+ * @see #resolveFields
1811
+ * @internal
1812
+ */
1813
+ static constexpr int32_t kResolveRemap = 32;
1814
+
1815
+ /**
1816
+ * Precedence table for Dates
1817
+ * @see #resolveFields
1818
+ * @internal
1819
+ */
1820
+ static const UFieldResolutionTable kDatePrecedence[];
1821
+
1822
+ /**
1823
+ * Precedence table for Year
1824
+ * @see #resolveFields
1825
+ * @internal
1826
+ */
1827
+ static const UFieldResolutionTable kYearPrecedence[];
1828
+
1829
+ /**
1830
+ * Precedence table for Day of Week
1831
+ * @see #resolveFields
1832
+ * @internal
1833
+ */
1834
+ static const UFieldResolutionTable kDOWPrecedence[];
1835
+
1836
+ /**
1837
+ * Precedence table for Months
1838
+ * @see #resolveFields
1839
+ * @internal
1840
+ */
1841
+ static const UFieldResolutionTable kMonthPrecedence[];
1842
+
1843
+ /**
1844
+ * Given a precedence table, return the newest field combination in
1845
+ * the table, or UCAL_FIELD_COUNT if none is found.
1846
+ *
1847
+ * <p>The precedence table is a 3-dimensional array of integers. It
1848
+ * may be thought of as an array of groups. Each group is an array of
1849
+ * lines. Each line is an array of field numbers. Within a line, if
1850
+ * all fields are set, then the time stamp of the line is taken to be
1851
+ * the stamp of the most recently set field. If any field of a line is
1852
+ * unset, then the line fails to match. Within a group, the line with
1853
+ * the newest time stamp is selected. The first field of the line is
1854
+ * returned to indicate which line matched.
1855
+ *
1856
+ * <p>In some cases, it may be desirable to map a line to field that
1857
+ * whose stamp is NOT examined. For example, if the best field is
1858
+ * DAY_OF_WEEK then the DAY_OF_WEEK_IN_MONTH algorithm may be used. In
1859
+ * order to do this, insert the value <code>kResolveRemap | F</code> at
1860
+ * the start of the line, where <code>F</code> is the desired return
1861
+ * field value. This field will NOT be examined; it only determines
1862
+ * the return value if the other fields in the line are the newest.
1863
+ *
1864
+ * <p>If all lines of a group contain at least one unset field, then no
1865
+ * line will match, and the group as a whole will fail to match. In
1866
+ * that case, the next group will be processed. If all groups fail to
1867
+ * match, then UCAL_FIELD_COUNT is returned.
1868
+ * @internal
1869
+ */
1870
+ UCalendarDateFields resolveFields(const UFieldResolutionTable *precedenceTable) const;
1871
+ #endif /* U_HIDE_INTERNAL_API */
1872
+
1873
+
1874
+ /**
1875
+ * @internal
1876
+ */
1877
+ virtual const UFieldResolutionTable* getFieldResolutionTable() const;
1878
+
1879
+ #ifndef U_HIDE_INTERNAL_API
1880
+ /**
1881
+ * Return the field that is newer, either defaultField, or
1882
+ * alternateField. If neither is newer or neither is set, return defaultField.
1883
+ * @internal
1884
+ */
1885
+ UCalendarDateFields newerField(UCalendarDateFields defaultField, UCalendarDateFields alternateField) const;
1886
+ #endif /* U_HIDE_INTERNAL_API */
1887
+
1888
+
1889
+ private:
1890
+ /**
1891
+ * Helper function for calculating limits by trial and error
1892
+ * @param field The field being investigated
1893
+ * @param startValue starting (least max) value of field
1894
+ * @param endValue ending (greatest max) value of field
1895
+ * @param status return type
1896
+ * @internal (private)
1897
+ */
1898
+ int32_t getActualHelper(UCalendarDateFields field, int32_t startValue, int32_t endValue, UErrorCode &status) const;
1899
+
1900
+
1901
+ protected:
1902
+ /**
1903
+ * The flag which indicates if the current time is set in the calendar.
1904
+ * @stable ICU 2.0
1905
+ */
1906
+ UBool fIsTimeSet;
1907
+
1908
+ /**
1909
+ * True if the fields are in sync with the currently set time of this Calendar.
1910
+ * If false, then the next attempt to get the value of a field will
1911
+ * force a recomputation of all fields from the current value of the time
1912
+ * field.
1913
+ * <P>
1914
+ * This should really be named areFieldsInSync, but the old name is retained
1915
+ * for backward compatibility.
1916
+ * @stable ICU 2.0
1917
+ */
1918
+ UBool fAreFieldsSet;
1919
+
1920
+ /**
1921
+ * True if all of the fields have been set. This is initially false, and set to
1922
+ * true by computeFields().
1923
+ * @stable ICU 2.0
1924
+ */
1925
+ UBool fAreAllFieldsSet;
1926
+
1927
+ /**
1928
+ * True if all fields have been virtually set, but have not yet been
1929
+ * computed. This occurs only in setTimeInMillis(). A calendar set
1930
+ * to this state will compute all fields from the time if it becomes
1931
+ * necessary, but otherwise will delay such computation.
1932
+ * @stable ICU 3.0
1933
+ */
1934
+ UBool fAreFieldsVirtuallySet;
1935
+
1936
+ /**
1937
+ * Get the current time without recomputing.
1938
+ *
1939
+ * @return the current time without recomputing.
1940
+ * @stable ICU 2.0
1941
+ */
1942
+ UDate internalGetTime() const { return fTime; }
1943
+
1944
+ /**
1945
+ * Set the current time without affecting flags or fields.
1946
+ *
1947
+ * @param time The time to be set
1948
+ * @return the current time without recomputing.
1949
+ * @stable ICU 2.0
1950
+ */
1951
+ void internalSetTime(UDate time) { fTime = time; }
1952
+
1953
+ /**
1954
+ * The time fields containing values into which the millis is computed.
1955
+ * @stable ICU 2.0
1956
+ */
1957
+ int32_t fFields[UCAL_FIELD_COUNT];
1958
+
1959
+ #ifndef U_FORCE_HIDE_DEPRECATED_API
1960
+ /**
1961
+ * The flags which tell if a specified time field for the calendar is set.
1962
+ * @deprecated ICU 2.8 use (fStamp[n]!=kUnset)
1963
+ */
1964
+ UBool fIsSet[UCAL_FIELD_COUNT];
1965
+ #endif // U_FORCE_HIDE_DEPRECATED_API
1966
+
1967
+ /** Special values of stamp[]
1968
+ * @stable ICU 2.0
1969
+ */
1970
+ enum {
1971
+ kUnset = 0,
1972
+ kInternallySet,
1973
+ kMinimumUserStamp
1974
+ };
1975
+
1976
+ /**
1977
+ * Pseudo-time-stamps which specify when each field was set. There
1978
+ * are two special values, UNSET and INTERNALLY_SET. Values from
1979
+ * MINIMUM_USER_SET to Integer.MAX_VALUE are legal user set values.
1980
+ * @stable ICU 2.0
1981
+ */
1982
+ int32_t fStamp[UCAL_FIELD_COUNT];
1983
+
1984
+ /**
1985
+ * Subclasses may override this method to compute several fields
1986
+ * specific to each calendar system. These are:
1987
+ *
1988
+ * <ul><li>ERA
1989
+ * <li>YEAR
1990
+ * <li>MONTH
1991
+ * <li>DAY_OF_MONTH
1992
+ * <li>DAY_OF_YEAR
1993
+ * <li>EXTENDED_YEAR</ul>
1994
+ *
1995
+ * Subclasses can refer to the DAY_OF_WEEK and DOW_LOCAL fields, which
1996
+ * will be set when this method is called. Subclasses can also call
1997
+ * the getGregorianXxx() methods to obtain Gregorian calendar
1998
+ * equivalents for the given Julian day.
1999
+ *
2000
+ * <p>In addition, subclasses should compute any subclass-specific
2001
+ * fields, that is, fields from BASE_FIELD_COUNT to
2002
+ * getFieldCount() - 1.
2003
+ *
2004
+ * <p>The default implementation in <code>Calendar</code> implements
2005
+ * a pure proleptic Gregorian calendar.
2006
+ * @internal
2007
+ */
2008
+ virtual void handleComputeFields(int32_t julianDay, UErrorCode &status);
2009
+
2010
+ #ifndef U_HIDE_INTERNAL_API
2011
+ /**
2012
+ * Return the extended year on the Gregorian calendar as computed by
2013
+ * <code>computeGregorianFields()</code>.
2014
+ * @internal
2015
+ */
2016
+ int32_t getGregorianYear() const {
2017
+ return fGregorianYear;
2018
+ }
2019
+
2020
+ /**
2021
+ * Return the month (0-based) on the Gregorian calendar as computed by
2022
+ * <code>computeGregorianFields()</code>.
2023
+ * @internal
2024
+ */
2025
+ int32_t getGregorianMonth() const {
2026
+ return fGregorianMonth;
2027
+ }
2028
+
2029
+ /**
2030
+ * Return the day of year (1-based) on the Gregorian calendar as
2031
+ * computed by <code>computeGregorianFields()</code>.
2032
+ * @internal
2033
+ */
2034
+ int32_t getGregorianDayOfYear() const {
2035
+ return fGregorianDayOfYear;
2036
+ }
2037
+
2038
+ /**
2039
+ * Return the day of month (1-based) on the Gregorian calendar as
2040
+ * computed by <code>computeGregorianFields()</code>.
2041
+ * @internal
2042
+ */
2043
+ int32_t getGregorianDayOfMonth() const {
2044
+ return fGregorianDayOfMonth;
2045
+ }
2046
+ #endif /* U_HIDE_INTERNAL_API */
2047
+
2048
+ /**
2049
+ * Called by computeJulianDay. Returns the default month (0-based) for the year,
2050
+ * taking year and era into account. Defaults to 0 for Gregorian, which doesn't care.
2051
+ * @param eyear The extended year
2052
+ * @param status Output param set to failure code on function return
2053
+ * when this function fails.
2054
+ * @internal
2055
+ */
2056
+ virtual int32_t getDefaultMonthInYear(int32_t eyear, UErrorCode& status);
2057
+
2058
+
2059
+ /**
2060
+ * Called by computeJulianDay. Returns the default day (1-based) for the month,
2061
+ * taking currently-set year and era into account. Defaults to 1 for Gregorian.
2062
+ * @param eyear the extended year
2063
+ * @param month the month in the year
2064
+ * @param status Output param set to failure code on function return
2065
+ * when this function fails.
2066
+ * @internal
2067
+ */
2068
+ virtual int32_t getDefaultDayInMonth(int32_t eyear, int32_t month, UErrorCode& status);
2069
+
2070
+ //-------------------------------------------------------------------------
2071
+ // Protected utility methods for use by subclasses. These are very handy
2072
+ // for implementing add, roll, and computeFields.
2073
+ //-------------------------------------------------------------------------
2074
+
2075
+ /**
2076
+ * Adjust the specified field so that it is within
2077
+ * the allowable range for the date to which this calendar is set.
2078
+ * For example, in a Gregorian calendar pinning the {@link #UCalendarDateFields DAY_OF_MONTH}
2079
+ * field for a calendar set to April 31 would cause it to be set
2080
+ * to April 30.
2081
+ * <p>
2082
+ * <b>Subclassing:</b>
2083
+ * <br>
2084
+ * This utility method is intended for use by subclasses that need to implement
2085
+ * their own overrides of {@link #roll roll} and {@link #add add}.
2086
+ * <p>
2087
+ * <b>Note:</b>
2088
+ * <code>pinField</code> is implemented in terms of
2089
+ * {@link #getActualMinimum getActualMinimum}
2090
+ * and {@link #getActualMaximum getActualMaximum}. If either of those methods uses
2091
+ * a slow, iterative algorithm for a particular field, it would be
2092
+ * unwise to attempt to call <code>pinField</code> for that field. If you
2093
+ * really do need to do so, you should override this method to do
2094
+ * something more efficient for that field.
2095
+ * <p>
2096
+ * @param field The calendar field whose value should be pinned.
2097
+ * @param status Output param set to failure code on function return
2098
+ * when this function fails.
2099
+ *
2100
+ * @see #getActualMinimum
2101
+ * @see #getActualMaximum
2102
+ * @stable ICU 2.0
2103
+ */
2104
+ virtual void pinField(UCalendarDateFields field, UErrorCode& status);
2105
+
2106
+ /**
2107
+ * Return the week number of a day, within a period. This may be the week number in
2108
+ * a year or the week number in a month. Usually this will be a value >= 1, but if
2109
+ * some initial days of the period are excluded from week 1, because
2110
+ * {@link #getMinimalDaysInFirstWeek getMinimalDaysInFirstWeek} is > 1, then
2111
+ * the week number will be zero for those
2112
+ * initial days. This method requires the day number and day of week for some
2113
+ * known date in the period in order to determine the day of week
2114
+ * on the desired day.
2115
+ * <p>
2116
+ * <b>Subclassing:</b>
2117
+ * <br>
2118
+ * This method is intended for use by subclasses in implementing their
2119
+ * {@link #computeTime computeTime} and/or {@link #computeFields computeFields} methods.
2120
+ * It is often useful in {@link #getActualMinimum getActualMinimum} and
2121
+ * {@link #getActualMaximum getActualMaximum} as well.
2122
+ * <p>
2123
+ * This variant is handy for computing the week number of some other
2124
+ * day of a period (often the first or last day of the period) when its day
2125
+ * of the week is not known but the day number and day of week for some other
2126
+ * day in the period (e.g. the current date) <em>is</em> known.
2127
+ * <p>
2128
+ * @param desiredDay The {@link #UCalendarDateFields DAY_OF_YEAR} or
2129
+ * {@link #UCalendarDateFields DAY_OF_MONTH} whose week number is desired.
2130
+ * Should be 1 for the first day of the period.
2131
+ *
2132
+ * @param dayOfPeriod The {@link #UCalendarDateFields DAY_OF_YEAR}
2133
+ * or {@link #UCalendarDateFields DAY_OF_MONTH} for a day in the period whose
2134
+ * {@link #UCalendarDateFields DAY_OF_WEEK} is specified by the
2135
+ * <code>knownDayOfWeek</code> parameter.
2136
+ * Should be 1 for first day of period.
2137
+ *
2138
+ * @param dayOfWeek The {@link #UCalendarDateFields DAY_OF_WEEK} for the day
2139
+ * corresponding to the <code>knownDayOfPeriod</code> parameter.
2140
+ * 1-based with 1=Sunday.
2141
+ *
2142
+ * @return The week number (one-based), or zero if the day falls before
2143
+ * the first week because
2144
+ * {@link #getMinimalDaysInFirstWeek getMinimalDaysInFirstWeek}
2145
+ * is more than one.
2146
+ *
2147
+ * @stable ICU 2.8
2148
+ */
2149
+ int32_t weekNumber(int32_t desiredDay, int32_t dayOfPeriod, int32_t dayOfWeek);
2150
+
2151
+
2152
+ #ifndef U_HIDE_INTERNAL_API
2153
+ /**
2154
+ * Return the week number of a day, within a period. This may be the week number in
2155
+ * a year, or the week number in a month. Usually this will be a value >= 1, but if
2156
+ * some initial days of the period are excluded from week 1, because
2157
+ * {@link #getMinimalDaysInFirstWeek getMinimalDaysInFirstWeek} is > 1,
2158
+ * then the week number will be zero for those
2159
+ * initial days. This method requires the day of week for the given date in order to
2160
+ * determine the result.
2161
+ * <p>
2162
+ * <b>Subclassing:</b>
2163
+ * <br>
2164
+ * This method is intended for use by subclasses in implementing their
2165
+ * {@link #computeTime computeTime} and/or {@link #computeFields computeFields} methods.
2166
+ * It is often useful in {@link #getActualMinimum getActualMinimum} and
2167
+ * {@link #getActualMaximum getActualMaximum} as well.
2168
+ * <p>
2169
+ * @param dayOfPeriod The {@link #UCalendarDateFields DAY_OF_YEAR} or
2170
+ * {@link #UCalendarDateFields DAY_OF_MONTH} whose week number is desired.
2171
+ * Should be 1 for the first day of the period.
2172
+ *
2173
+ * @param dayOfWeek The {@link #UCalendarDateFields DAY_OF_WEEK} for the day
2174
+ * corresponding to the <code>dayOfPeriod</code> parameter.
2175
+ * 1-based with 1=Sunday.
2176
+ *
2177
+ * @return The week number (one-based), or zero if the day falls before
2178
+ * the first week because
2179
+ * {@link #getMinimalDaysInFirstWeek getMinimalDaysInFirstWeek}
2180
+ * is more than one.
2181
+ * @internal
2182
+ */
2183
+ inline int32_t weekNumber(int32_t dayOfPeriod, int32_t dayOfWeek);
2184
+
2185
+ /**
2186
+ * returns the local DOW, valid range 0..6
2187
+ * @internal
2188
+ */
2189
+ int32_t getLocalDOW(UErrorCode& status);
2190
+ #endif /* U_HIDE_INTERNAL_API */
2191
+
2192
+ private:
2193
+
2194
+ /**
2195
+ * The next available value for fStamp[]
2196
+ */
2197
+ int32_t fNextStamp;// = MINIMUM_USER_STAMP;
2198
+
2199
+ /**
2200
+ * Recalculates the time stamp array (fStamp).
2201
+ * Resets fNextStamp to lowest next stamp value.
2202
+ */
2203
+ void recalculateStamp();
2204
+
2205
+ /**
2206
+ * The current time set for the calendar.
2207
+ */
2208
+ UDate fTime;
2209
+
2210
+ /**
2211
+ * @see #setLenient
2212
+ */
2213
+ UBool fLenient;
2214
+
2215
+ /**
2216
+ * Time zone affects the time calculation done by Calendar. Calendar subclasses use
2217
+ * the time zone data to produce the local time. Always set; never nullptr.
2218
+ */
2219
+ TimeZone* fZone;
2220
+
2221
+ /**
2222
+ * Option for repeated wall time
2223
+ * @see #setRepeatedWallTimeOption
2224
+ */
2225
+ UCalendarWallTimeOption fRepeatedWallTime;
2226
+
2227
+ /**
2228
+ * Option for skipped wall time
2229
+ * @see #setSkippedWallTimeOption
2230
+ */
2231
+ UCalendarWallTimeOption fSkippedWallTime;
2232
+
2233
+ /**
2234
+ * Both firstDayOfWeek and minimalDaysInFirstWeek are locale-dependent. They are
2235
+ * used to figure out the week count for a specific date for a given locale. These
2236
+ * must be set when a Calendar is constructed. For example, in US locale,
2237
+ * firstDayOfWeek is SUNDAY; minimalDaysInFirstWeek is 1. They are used to figure
2238
+ * out the week count for a specific date for a given locale. These must be set when
2239
+ * a Calendar is constructed.
2240
+ */
2241
+ UCalendarDaysOfWeek fFirstDayOfWeek;
2242
+ uint8_t fMinimalDaysInFirstWeek;
2243
+ UCalendarDaysOfWeek fWeekendOnset;
2244
+ int32_t fWeekendOnsetMillis;
2245
+ UCalendarDaysOfWeek fWeekendCease;
2246
+ int32_t fWeekendCeaseMillis;
2247
+
2248
+ /**
2249
+ * Sets firstDayOfWeek and minimalDaysInFirstWeek. Called at Calendar construction
2250
+ * time.
2251
+ *
2252
+ * @param desiredLocale The given locale.
2253
+ * @param type The calendar type identifier, e.g: gregorian, buddhist, etc.
2254
+ * @param success Indicates the status of setting the week count data from
2255
+ * the resource for the given locale. Returns U_ZERO_ERROR if
2256
+ * constructed successfully.
2257
+ */
2258
+ void setWeekData(const Locale& desiredLocale, const char *type, UErrorCode& success);
2259
+
2260
+ /**
2261
+ * Recompute the time and update the status fields isTimeSet
2262
+ * and areFieldsSet. Callers should check isTimeSet and only
2263
+ * call this method if isTimeSet is false.
2264
+ *
2265
+ * @param status Output param set to success/failure code on exit. If any value
2266
+ * previously set in the time field is invalid or restricted by
2267
+ * leniency, this will be set to an error status.
2268
+ */
2269
+ void updateTime(UErrorCode& status);
2270
+
2271
+ /**
2272
+ * The Gregorian year, as computed by computeGregorianFields() and
2273
+ * returned by getGregorianYear().
2274
+ * @see #computeGregorianFields
2275
+ */
2276
+ int32_t fGregorianYear;
2277
+
2278
+ /**
2279
+ * The Gregorian month, as computed by computeGregorianFields() and
2280
+ * returned by getGregorianMonth().
2281
+ * @see #computeGregorianFields
2282
+ */
2283
+ int32_t fGregorianMonth;
2284
+
2285
+ /**
2286
+ * The Gregorian day of the year, as computed by
2287
+ * computeGregorianFields() and returned by getGregorianDayOfYear().
2288
+ * @see #computeGregorianFields
2289
+ */
2290
+ int32_t fGregorianDayOfYear;
2291
+
2292
+ /**
2293
+ * The Gregorian day of the month, as computed by
2294
+ * computeGregorianFields() and returned by getGregorianDayOfMonth().
2295
+ * @see #computeGregorianFields
2296
+ */
2297
+ int32_t fGregorianDayOfMonth;
2298
+
2299
+ /* calculations */
2300
+
2301
+ /**
2302
+ * Compute the Gregorian calendar year, month, and day of month from
2303
+ * the given Julian day. These values are not stored in fields, but in
2304
+ * member variables gregorianXxx. Also compute the DAY_OF_WEEK and
2305
+ * DOW_LOCAL fields.
2306
+ */
2307
+ void computeGregorianAndDOWFields(int32_t julianDay, UErrorCode &ec);
2308
+
2309
+ protected:
2310
+
2311
+ /**
2312
+ * Compute the Gregorian calendar year, month, and day of month from the
2313
+ * Julian day. These values are not stored in fields, but in member
2314
+ * variables gregorianXxx. They are used for time zone computations and by
2315
+ * subclasses that are Gregorian derivatives. Subclasses may call this
2316
+ * method to perform a Gregorian calendar millis->fields computation.
2317
+ */
2318
+ void computeGregorianFields(int32_t julianDay, UErrorCode &ec);
2319
+
2320
+ private:
2321
+
2322
+ /**
2323
+ * Compute the fields WEEK_OF_YEAR, YEAR_WOY, WEEK_OF_MONTH,
2324
+ * DAY_OF_WEEK_IN_MONTH, and DOW_LOCAL from EXTENDED_YEAR, YEAR,
2325
+ * DAY_OF_WEEK, and DAY_OF_YEAR. The latter fields are computed by the
2326
+ * subclass based on the calendar system.
2327
+ *
2328
+ * <p>The YEAR_WOY field is computed simplistically. It is equal to YEAR
2329
+ * most of the time, but at the year boundary it may be adjusted to YEAR-1
2330
+ * or YEAR+1 to reflect the overlap of a week into an adjacent year. In
2331
+ * this case, a simple increment or decrement is performed on YEAR, even
2332
+ * though this may yield an invalid YEAR value. For instance, if the YEAR
2333
+ * is part of a calendar system with an N-year cycle field CYCLE, then
2334
+ * incrementing the YEAR may involve incrementing CYCLE and setting YEAR
2335
+ * back to 0 or 1. This is not handled by this code, and in fact cannot be
2336
+ * simply handled without having subclasses define an entire parallel set of
2337
+ * fields for fields larger than or equal to a year. This additional
2338
+ * complexity is not warranted, since the intention of the YEAR_WOY field is
2339
+ * to support ISO 8601 notation, so it will typically be used with a
2340
+ * proleptic Gregorian calendar, which has no field larger than a year.
2341
+ */
2342
+ void computeWeekFields(UErrorCode &ec);
2343
+
2344
+
2345
+ /**
2346
+ * Ensure that each field is within its valid range by calling {@link
2347
+ * #validateField(int, int&)} on each field that has been set. This method
2348
+ * should only be called if this calendar is not lenient.
2349
+ * @see #isLenient
2350
+ * @see #validateField(int, int&)
2351
+ */
2352
+ void validateFields(UErrorCode &status);
2353
+
2354
+ /**
2355
+ * Validate a single field of this calendar given its minimum and
2356
+ * maximum allowed value. If the field is out of range,
2357
+ * <code>U_ILLEGAL_ARGUMENT_ERROR</code> will be set. Subclasses may
2358
+ * use this method in their implementation of {@link
2359
+ * #validateField(int, int&)}.
2360
+ */
2361
+ void validateField(UCalendarDateFields field, int32_t min, int32_t max, UErrorCode& status);
2362
+
2363
+ protected:
2364
+ #ifndef U_HIDE_INTERNAL_API
2365
+ /**
2366
+ * Convert a quasi Julian date to the day of the week. The Julian date used here is
2367
+ * not a true Julian date, since it is measured from midnight, not noon. Return
2368
+ * value is one-based.
2369
+ *
2370
+ * @param julian The given Julian date number.
2371
+ * @return Day number from 1..7 (SUN..SAT).
2372
+ * @internal
2373
+ */
2374
+ static uint8_t julianDayToDayOfWeek(int32_t julian);
2375
+ #endif /* U_HIDE_INTERNAL_API */
2376
+
2377
+ private:
2378
+ char validLocale[ULOC_FULLNAME_CAPACITY];
2379
+ char actualLocale[ULOC_FULLNAME_CAPACITY];
2380
+
2381
+ public:
2382
+ #if !UCONFIG_NO_SERVICE
2383
+ /**
2384
+ * INTERNAL FOR 2.6 -- Registration.
2385
+ */
2386
+
2387
+ #ifndef U_HIDE_INTERNAL_API
2388
+ /**
2389
+ * Return a StringEnumeration over the locales available at the time of the call,
2390
+ * including registered locales.
2391
+ * @return a StringEnumeration over the locales available at the time of the call
2392
+ * @internal
2393
+ */
2394
+ static StringEnumeration* getAvailableLocales();
2395
+
2396
+ /**
2397
+ * Register a new Calendar factory. The factory will be adopted.
2398
+ * INTERNAL in 2.6
2399
+ *
2400
+ * Because ICU may choose to cache Calendars internally, this must
2401
+ * be called at application startup, prior to any calls to
2402
+ * Calendar::createInstance to avoid undefined behavior.
2403
+ *
2404
+ * @param toAdopt the factory instance to be adopted
2405
+ * @param status the in/out status code, no special meanings are assigned
2406
+ * @return a registry key that can be used to unregister this factory
2407
+ * @internal
2408
+ */
2409
+ static URegistryKey registerFactory(ICUServiceFactory* toAdopt, UErrorCode& status);
2410
+
2411
+ /**
2412
+ * Unregister a previously-registered CalendarFactory using the key returned from the
2413
+ * register call. Key becomes invalid after a successful call and should not be used again.
2414
+ * The CalendarFactory corresponding to the key will be deleted.
2415
+ * INTERNAL in 2.6
2416
+ *
2417
+ * Because ICU may choose to cache Calendars internally, this should
2418
+ * be called during application shutdown, after all calls to
2419
+ * Calendar::createInstance to avoid undefined behavior.
2420
+ *
2421
+ * @param key the registry key returned by a previous call to registerFactory
2422
+ * @param status the in/out status code, no special meanings are assigned
2423
+ * @return true if the factory for the key was successfully unregistered
2424
+ * @internal
2425
+ */
2426
+ static UBool unregister(URegistryKey key, UErrorCode& status);
2427
+ #endif /* U_HIDE_INTERNAL_API */
2428
+
2429
+ /**
2430
+ * Multiple Calendar Implementation
2431
+ * @internal
2432
+ */
2433
+ friend class CalendarFactory;
2434
+
2435
+ /**
2436
+ * Multiple Calendar Implementation
2437
+ * @internal
2438
+ */
2439
+ friend class CalendarService;
2440
+
2441
+ /**
2442
+ * Multiple Calendar Implementation
2443
+ * @internal
2444
+ */
2445
+ friend class DefaultCalendarFactory;
2446
+ #endif /* !UCONFIG_NO_SERVICE */
2447
+
2448
+ /**
2449
+ * @return true if this calendar has a default century (i.e. 03 -> 2003)
2450
+ * @internal
2451
+ */
2452
+ virtual UBool haveDefaultCentury() const = 0;
2453
+
2454
+ /**
2455
+ * @return the start of the default century, as a UDate
2456
+ * @internal
2457
+ */
2458
+ virtual UDate defaultCenturyStart() const = 0;
2459
+ /**
2460
+ * @return the beginning year of the default century, as a year
2461
+ * @internal
2462
+ */
2463
+ virtual int32_t defaultCenturyStartYear() const = 0;
2464
+
2465
+ /** Get the locale for this calendar object. You can choose between valid and actual locale.
2466
+ * @param type type of the locale we're looking for (valid or actual)
2467
+ * @param status error code for the operation
2468
+ * @return the locale
2469
+ * @stable ICU 2.8
2470
+ */
2471
+ Locale getLocale(ULocDataLocaleType type, UErrorCode &status) const;
2472
+
2473
+ /**
2474
+ * @return The related Gregorian year; will be obtained by modifying the value
2475
+ * obtained by get from UCAL_EXTENDED_YEAR field
2476
+ * @internal
2477
+ */
2478
+ virtual int32_t getRelatedYear(UErrorCode &status) const;
2479
+
2480
+ /**
2481
+ * @param year The related Gregorian year to set; will be modified as necessary then
2482
+ * set in UCAL_EXTENDED_YEAR field
2483
+ * @internal
2484
+ */
2485
+ virtual void setRelatedYear(int32_t year);
2486
+
2487
+ #ifndef U_HIDE_INTERNAL_API
2488
+ /** Get the locale for this calendar object. You can choose between valid and actual locale.
2489
+ * @param type type of the locale we're looking for (valid or actual)
2490
+ * @param status error code for the operation
2491
+ * @return the locale
2492
+ * @internal
2493
+ */
2494
+ const char* getLocaleID(ULocDataLocaleType type, UErrorCode &status) const;
2495
+ #endif /* U_HIDE_INTERNAL_API */
2496
+
2497
+ private:
2498
+ /**
2499
+ * Cast TimeZone used by this object to BasicTimeZone, or nullptr if the TimeZone
2500
+ * is not an instance of BasicTimeZone.
2501
+ */
2502
+ BasicTimeZone* getBasicTimeZone() const;
2503
+
2504
+ /**
2505
+ * Find the previous zone transition near the given time.
2506
+ * @param base The base time, inclusive
2507
+ * @param transitionTime Receives the result time
2508
+ * @param status The error status
2509
+ * @return true if a transition is found.
2510
+ */
2511
+ UBool getImmediatePreviousZoneTransition(UDate base, UDate *transitionTime, UErrorCode& status) const;
2512
+
2513
+ public:
2514
+ #ifndef U_HIDE_INTERNAL_API
2515
+ /**
2516
+ * Creates a new Calendar from a Locale for the cache.
2517
+ * This method does not set the time or timezone in returned calendar.
2518
+ * @param locale the locale.
2519
+ * @param status any error returned here.
2520
+ * @return the new Calendar object with no time or timezone set.
2521
+ * @internal For ICU use only.
2522
+ */
2523
+ static Calendar * U_EXPORT2 makeInstance(
2524
+ const Locale &locale, UErrorCode &status);
2525
+
2526
+ /**
2527
+ * Get the calendar type for given locale.
2528
+ * @param locale the locale
2529
+ * @param typeBuffer calendar type returned here
2530
+ * @param typeBufferSize The size of typeBuffer in bytes. If the type
2531
+ * can't fit in the buffer, this method sets status to
2532
+ * U_BUFFER_OVERFLOW_ERROR
2533
+ * @param status error, if any, returned here.
2534
+ * @internal For ICU use only.
2535
+ */
2536
+ static void U_EXPORT2 getCalendarTypeFromLocale(
2537
+ const Locale &locale,
2538
+ char *typeBuffer,
2539
+ int32_t typeBufferSize,
2540
+ UErrorCode &status);
2541
+ #endif /* U_HIDE_INTERNAL_API */
2542
+ };
2543
+
2544
+ // -------------------------------------
2545
+
2546
+ inline Calendar*
2547
+ Calendar::createInstance(TimeZone* zone, UErrorCode& errorCode)
2548
+ {
2549
+ // since the Locale isn't specified, use the default locale
2550
+ return createInstance(zone, Locale::getDefault(), errorCode);
2551
+ }
2552
+
2553
+ // -------------------------------------
2554
+
2555
+ inline void
2556
+ Calendar::roll(UCalendarDateFields field, UBool up, UErrorCode& status)
2557
+ {
2558
+ roll(field, static_cast<int32_t>(up ? +1 : -1), status);
2559
+ }
2560
+
2561
+ #ifndef U_HIDE_DEPRECATED_API
2562
+ inline void
2563
+ Calendar::roll(EDateFields field, UBool up, UErrorCode& status)
2564
+ {
2565
+ roll(static_cast<UCalendarDateFields>(field), up, status);
2566
+ }
2567
+ #endif /* U_HIDE_DEPRECATED_API */
2568
+
2569
+
2570
+ // -------------------------------------
2571
+
2572
+ /**
2573
+ * Fast method for subclasses. The caller must maintain fUserSetDSTOffset and
2574
+ * fUserSetZoneOffset, as well as the isSet[] array.
2575
+ */
2576
+
2577
+ inline void
2578
+ Calendar::internalSet(UCalendarDateFields field, int32_t value)
2579
+ {
2580
+ fFields[field] = value;
2581
+ fStamp[field] = kInternallySet;
2582
+ fIsSet[field] = true; // Remove later
2583
+ }
2584
+
2585
+ /**
2586
+ * Macro for the class to declare it override
2587
+ * haveDefaultCentury, defaultCenturyStart, and
2588
+ * defaultCenturyStartYear functions in this class.
2589
+ * @internal
2590
+ */
2591
+ #define DECLARE_OVERRIDE_SYSTEM_DEFAULT_CENTURY \
2592
+ virtual UBool haveDefaultCentury() const override; \
2593
+ virtual UDate defaultCenturyStart() const override; \
2594
+ virtual int32_t defaultCenturyStartYear() const override;
2595
+
2596
+ #ifndef U_HIDE_INTERNAL_API
2597
+ inline int32_t Calendar::weekNumber(int32_t dayOfPeriod, int32_t dayOfWeek)
2598
+ {
2599
+ return weekNumber(dayOfPeriod, dayOfPeriod, dayOfWeek);
2600
+ }
2601
+ #endif /* U_HIDE_INTERNAL_API */
2602
+
2603
+ U_NAMESPACE_END
2604
+
2605
+ #endif /* #if !UCONFIG_NO_FORMATTING */
2606
+
2607
+ #endif /* U_SHOW_CPLUSPLUS_API */
2608
+
2609
+ #endif // _CALENDAR