pango 2.2.4-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (530) hide show
  1. checksums.yaml +7 -0
  2. data/README +33 -0
  3. data/Rakefile +65 -0
  4. data/ext/pango/depend +12 -0
  5. data/ext/pango/extconf.rb +90 -0
  6. data/ext/pango/pango.def +18 -0
  7. data/ext/pango/rbpango.c +318 -0
  8. data/ext/pango/rbpango.h +96 -0
  9. data/ext/pango/rbpangoanalysis.c +218 -0
  10. data/ext/pango/rbpangoattribute.c +499 -0
  11. data/ext/pango/rbpangoattriterator.c +141 -0
  12. data/ext/pango/rbpangoattrlist.c +101 -0
  13. data/ext/pango/rbpangocairo.c +122 -0
  14. data/ext/pango/rbpangocairocontext.c +131 -0
  15. data/ext/pango/rbpangocolor.c +120 -0
  16. data/ext/pango/rbpangocontext.c +309 -0
  17. data/ext/pango/rbpangoconversions.h +111 -0
  18. data/ext/pango/rbpangocoverage.c +106 -0
  19. data/ext/pango/rbpangoengine.c +73 -0
  20. data/ext/pango/rbpangofont.c +110 -0
  21. data/ext/pango/rbpangofontdescription.c +282 -0
  22. data/ext/pango/rbpangofontface.c +73 -0
  23. data/ext/pango/rbpangofontfamily.c +79 -0
  24. data/ext/pango/rbpangofontmap.c +102 -0
  25. data/ext/pango/rbpangofontmetrics.c +85 -0
  26. data/ext/pango/rbpangofontset.c +69 -0
  27. data/ext/pango/rbpangofontsetsimple.c +60 -0
  28. data/ext/pango/rbpangoglyphinfo.c +123 -0
  29. data/ext/pango/rbpangoglyphitem.c +125 -0
  30. data/ext/pango/rbpangoglyphstring.c +151 -0
  31. data/ext/pango/rbpangogravity.c +54 -0
  32. data/ext/pango/rbpangoitem.c +95 -0
  33. data/ext/pango/rbpangolanguage.c +86 -0
  34. data/ext/pango/rbpangolayout.c +572 -0
  35. data/ext/pango/rbpangolayoutiter.c +189 -0
  36. data/ext/pango/rbpangolayoutline.c +239 -0
  37. data/ext/pango/rbpangologattr.c +109 -0
  38. data/ext/pango/rbpangomatrix.c +143 -0
  39. data/ext/pango/rbpangoprivate.h +49 -0
  40. data/ext/pango/rbpangorectangle.c +170 -0
  41. data/ext/pango/rbpangorenderer.c +193 -0
  42. data/ext/pango/rbpangoscript.c +84 -0
  43. data/ext/pango/rbpangoscriptiter.c +92 -0
  44. data/ext/pango/rbpangotabarray.c +128 -0
  45. data/extconf.rb +49 -0
  46. data/lib/2.0/pango.so +0 -0
  47. data/lib/2.1/pango.so +0 -0
  48. data/lib/2.2/pango.so +0 -0
  49. data/lib/pango.rb +79 -0
  50. data/sample/attribute.rb +82 -0
  51. data/sample/break.rb +28 -0
  52. data/sample/gdk_layout.rb +27 -0
  53. data/sample/glyphstring.rb +61 -0
  54. data/sample/item.rb +37 -0
  55. data/sample/label.rb +23 -0
  56. data/sample/layout.rb +102 -0
  57. data/sample/pango_cairo.rb +66 -0
  58. data/sample/parse.rb +33 -0
  59. data/sample/sample.txt +10 -0
  60. data/sample/script.rb +23 -0
  61. data/test/pango-test-utils.rb +9 -0
  62. data/test/run-test.rb +28 -0
  63. data/test/test-analysis.rb +26 -0
  64. data/test/test-attribute.rb +19 -0
  65. data/test/test-color.rb +47 -0
  66. data/test/test-language.rb +7 -0
  67. data/test/test-layout.rb +34 -0
  68. data/test/test-log-attr.rb +26 -0
  69. data/test/test-matrix.rb +26 -0
  70. data/test/test-rectangle.rb +26 -0
  71. data/vendor/local/bin/derb.exe +0 -0
  72. data/vendor/local/bin/genbrk.exe +0 -0
  73. data/vendor/local/bin/genccode.exe +0 -0
  74. data/vendor/local/bin/gencfu.exe +0 -0
  75. data/vendor/local/bin/gencmn.exe +0 -0
  76. data/vendor/local/bin/gencnval.exe +0 -0
  77. data/vendor/local/bin/gendict.exe +0 -0
  78. data/vendor/local/bin/gennorm2.exe +0 -0
  79. data/vendor/local/bin/genrb.exe +0 -0
  80. data/vendor/local/bin/gensprep.exe +0 -0
  81. data/vendor/local/bin/hb-ot-shape-closure.exe +0 -0
  82. data/vendor/local/bin/hb-shape.exe +0 -0
  83. data/vendor/local/bin/hb-view.exe +0 -0
  84. data/vendor/local/bin/icu-config +820 -0
  85. data/vendor/local/bin/icuinfo.exe +0 -0
  86. data/vendor/local/bin/icupkg.exe +0 -0
  87. data/vendor/local/bin/libharfbuzz-0.dll +0 -0
  88. data/vendor/local/bin/libpango-1.0-0.dll +0 -0
  89. data/vendor/local/bin/libpangocairo-1.0-0.dll +0 -0
  90. data/vendor/local/bin/libpangoft2-1.0-0.dll +0 -0
  91. data/vendor/local/bin/libpangowin32-1.0-0.dll +0 -0
  92. data/vendor/local/bin/makeconv.exe +0 -0
  93. data/vendor/local/bin/pango-querymodules.exe +0 -0
  94. data/vendor/local/bin/pango-view.exe +0 -0
  95. data/vendor/local/bin/pkgdata.exe +0 -0
  96. data/vendor/local/bin/uconv.exe +0 -0
  97. data/vendor/local/etc/pango/pango.modules +19 -0
  98. data/vendor/local/include/harfbuzz/hb-blob.h +126 -0
  99. data/vendor/local/include/harfbuzz/hb-buffer.h +344 -0
  100. data/vendor/local/include/harfbuzz/hb-common.h +344 -0
  101. data/vendor/local/include/harfbuzz/hb-deprecated.h +51 -0
  102. data/vendor/local/include/harfbuzz/hb-face.h +117 -0
  103. data/vendor/local/include/harfbuzz/hb-font.h +507 -0
  104. data/vendor/local/include/harfbuzz/hb-ft.h +62 -0
  105. data/vendor/local/include/harfbuzz/hb-glib.h +52 -0
  106. data/vendor/local/include/harfbuzz/hb-icu.h +52 -0
  107. data/vendor/local/include/harfbuzz/hb-ot-font.h +41 -0
  108. data/vendor/local/include/harfbuzz/hb-ot-layout.h +302 -0
  109. data/vendor/local/include/harfbuzz/hb-ot-shape.h +53 -0
  110. data/vendor/local/include/harfbuzz/hb-ot-tag.h +59 -0
  111. data/vendor/local/include/harfbuzz/hb-ot.h +43 -0
  112. data/vendor/local/include/harfbuzz/hb-set.h +154 -0
  113. data/vendor/local/include/harfbuzz/hb-shape-plan.h +89 -0
  114. data/vendor/local/include/harfbuzz/hb-shape.h +81 -0
  115. data/vendor/local/include/harfbuzz/hb-unicode.h +445 -0
  116. data/vendor/local/include/harfbuzz/hb-version.h +66 -0
  117. data/vendor/local/include/harfbuzz/hb.h +47 -0
  118. data/vendor/local/include/layout/LEFontInstance.h +550 -0
  119. data/vendor/local/include/layout/LEGlyphFilter.h +45 -0
  120. data/vendor/local/include/layout/LEGlyphStorage.h +546 -0
  121. data/vendor/local/include/layout/LEInsertionList.h +177 -0
  122. data/vendor/local/include/layout/LELanguages.h +112 -0
  123. data/vendor/local/include/layout/LEScripts.h +263 -0
  124. data/vendor/local/include/layout/LESwaps.h +100 -0
  125. data/vendor/local/include/layout/LETableReference.h +418 -0
  126. data/vendor/local/include/layout/LETypes.h +728 -0
  127. data/vendor/local/include/layout/LayoutEngine.h +518 -0
  128. data/vendor/local/include/layout/ParagraphLayout.h +747 -0
  129. data/vendor/local/include/layout/RunArrays.h +676 -0
  130. data/vendor/local/include/layout/loengine.h +225 -0
  131. data/vendor/local/include/layout/playout.h +466 -0
  132. data/vendor/local/include/layout/plruns.h +441 -0
  133. data/vendor/local/include/pango-1.0/pango/pango-attributes.h +514 -0
  134. data/vendor/local/include/pango-1.0/pango/pango-bidi-type.h +136 -0
  135. data/vendor/local/include/pango-1.0/pango/pango-break.h +173 -0
  136. data/vendor/local/include/pango-1.0/pango/pango-context.h +112 -0
  137. data/vendor/local/include/pango-1.0/pango/pango-coverage.h +79 -0
  138. data/vendor/local/include/pango-1.0/pango/pango-engine.h +429 -0
  139. data/vendor/local/include/pango-1.0/pango/pango-enum-types.h +69 -0
  140. data/vendor/local/include/pango-1.0/pango/pango-features.h +12 -0
  141. data/vendor/local/include/pango-1.0/pango/pango-font.h +622 -0
  142. data/vendor/local/include/pango-1.0/pango/pango-fontmap.h +167 -0
  143. data/vendor/local/include/pango-1.0/pango/pango-fontset.h +169 -0
  144. data/vendor/local/include/pango-1.0/pango/pango-glyph-item.h +158 -0
  145. data/vendor/local/include/pango-1.0/pango/pango-glyph.h +197 -0
  146. data/vendor/local/include/pango-1.0/pango/pango-gravity.h +128 -0
  147. data/vendor/local/include/pango-1.0/pango/pango-item.h +109 -0
  148. data/vendor/local/include/pango-1.0/pango/pango-language.h +61 -0
  149. data/vendor/local/include/pango-1.0/pango/pango-layout.h +340 -0
  150. data/vendor/local/include/pango-1.0/pango/pango-matrix.h +117 -0
  151. data/vendor/local/include/pango-1.0/pango/pango-modules.h +71 -0
  152. data/vendor/local/include/pango-1.0/pango/pango-ot.h +391 -0
  153. data/vendor/local/include/pango-1.0/pango/pango-renderer.h +260 -0
  154. data/vendor/local/include/pango-1.0/pango/pango-script.h +260 -0
  155. data/vendor/local/include/pango-1.0/pango/pango-tabs.h +87 -0
  156. data/vendor/local/include/pango-1.0/pango/pango-types.h +200 -0
  157. data/vendor/local/include/pango-1.0/pango/pango-utils.h +189 -0
  158. data/vendor/local/include/pango-1.0/pango/pango.h +48 -0
  159. data/vendor/local/include/pango-1.0/pango/pangocairo.h +169 -0
  160. data/vendor/local/include/pango-1.0/pango/pangofc-decoder.h +110 -0
  161. data/vendor/local/include/pango-1.0/pango/pangofc-font.h +153 -0
  162. data/vendor/local/include/pango-1.0/pango/pangofc-fontmap.h +289 -0
  163. data/vendor/local/include/pango-1.0/pango/pangoft2.h +133 -0
  164. data/vendor/local/include/pango-1.0/pango/pangowin32.h +128 -0
  165. data/vendor/local/include/unicode/alphaindex.h +752 -0
  166. data/vendor/local/include/unicode/appendable.h +232 -0
  167. data/vendor/local/include/unicode/basictz.h +214 -0
  168. data/vendor/local/include/unicode/brkiter.h +655 -0
  169. data/vendor/local/include/unicode/bytestream.h +257 -0
  170. data/vendor/local/include/unicode/bytestrie.h +519 -0
  171. data/vendor/local/include/unicode/bytestriebuilder.h +181 -0
  172. data/vendor/local/include/unicode/calendar.h +2519 -0
  173. data/vendor/local/include/unicode/caniter.h +208 -0
  174. data/vendor/local/include/unicode/chariter.h +722 -0
  175. data/vendor/local/include/unicode/choicfmt.h +594 -0
  176. data/vendor/local/include/unicode/coleitr.h +404 -0
  177. data/vendor/local/include/unicode/coll.h +1267 -0
  178. data/vendor/local/include/unicode/compactdecimalformat.h +330 -0
  179. data/vendor/local/include/unicode/curramt.h +130 -0
  180. data/vendor/local/include/unicode/currpinf.h +258 -0
  181. data/vendor/local/include/unicode/currunit.h +110 -0
  182. data/vendor/local/include/unicode/datefmt.h +883 -0
  183. data/vendor/local/include/unicode/dbbi.h +40 -0
  184. data/vendor/local/include/unicode/dcfmtsym.h +482 -0
  185. data/vendor/local/include/unicode/decimfmt.h +2479 -0
  186. data/vendor/local/include/unicode/docmain.h +215 -0
  187. data/vendor/local/include/unicode/dtfmtsym.h +912 -0
  188. data/vendor/local/include/unicode/dtintrv.h +158 -0
  189. data/vendor/local/include/unicode/dtitvfmt.h +985 -0
  190. data/vendor/local/include/unicode/dtitvinf.h +514 -0
  191. data/vendor/local/include/unicode/dtptngen.h +498 -0
  192. data/vendor/local/include/unicode/dtrule.h +250 -0
  193. data/vendor/local/include/unicode/enumset.h +64 -0
  194. data/vendor/local/include/unicode/errorcode.h +137 -0
  195. data/vendor/local/include/unicode/fieldpos.h +291 -0
  196. data/vendor/local/include/unicode/filteredbrk.h +131 -0
  197. data/vendor/local/include/unicode/fmtable.h +760 -0
  198. data/vendor/local/include/unicode/format.h +305 -0
  199. data/vendor/local/include/unicode/fpositer.h +117 -0
  200. data/vendor/local/include/unicode/gender.h +111 -0
  201. data/vendor/local/include/unicode/gregocal.h +777 -0
  202. data/vendor/local/include/unicode/icudataver.h +41 -0
  203. data/vendor/local/include/unicode/icuplug.h +371 -0
  204. data/vendor/local/include/unicode/idna.h +323 -0
  205. data/vendor/local/include/unicode/listformatter.h +167 -0
  206. data/vendor/local/include/unicode/localpointer.h +304 -0
  207. data/vendor/local/include/unicode/locdspnm.h +204 -0
  208. data/vendor/local/include/unicode/locid.h +815 -0
  209. data/vendor/local/include/unicode/measfmt.h +389 -0
  210. data/vendor/local/include/unicode/measunit.h +1443 -0
  211. data/vendor/local/include/unicode/measure.h +159 -0
  212. data/vendor/local/include/unicode/messagepattern.h +943 -0
  213. data/vendor/local/include/unicode/msgfmt.h +1093 -0
  214. data/vendor/local/include/unicode/normalizer2.h +658 -0
  215. data/vendor/local/include/unicode/normlzr.h +797 -0
  216. data/vendor/local/include/unicode/numfmt.h +1187 -0
  217. data/vendor/local/include/unicode/numsys.h +208 -0
  218. data/vendor/local/include/unicode/parseerr.h +92 -0
  219. data/vendor/local/include/unicode/parsepos.h +230 -0
  220. data/vendor/local/include/unicode/platform.h +751 -0
  221. data/vendor/local/include/unicode/plurfmt.h +615 -0
  222. data/vendor/local/include/unicode/plurrule.h +501 -0
  223. data/vendor/local/include/unicode/ptypes.h +126 -0
  224. data/vendor/local/include/unicode/putil.h +181 -0
  225. data/vendor/local/include/unicode/rbbi.h +782 -0
  226. data/vendor/local/include/unicode/rbnf.h +1032 -0
  227. data/vendor/local/include/unicode/rbtz.h +362 -0
  228. data/vendor/local/include/unicode/regex.h +1857 -0
  229. data/vendor/local/include/unicode/region.h +228 -0
  230. data/vendor/local/include/unicode/reldatefmt.h +498 -0
  231. data/vendor/local/include/unicode/rep.h +261 -0
  232. data/vendor/local/include/unicode/resbund.h +490 -0
  233. data/vendor/local/include/unicode/schriter.h +187 -0
  234. data/vendor/local/include/unicode/scientificformathelper.h +139 -0
  235. data/vendor/local/include/unicode/search.h +575 -0
  236. data/vendor/local/include/unicode/selfmt.h +367 -0
  237. data/vendor/local/include/unicode/simpletz.h +928 -0
  238. data/vendor/local/include/unicode/smpdtfmt.h +1592 -0
  239. data/vendor/local/include/unicode/sortkey.h +338 -0
  240. data/vendor/local/include/unicode/std_string.h +37 -0
  241. data/vendor/local/include/unicode/strenum.h +276 -0
  242. data/vendor/local/include/unicode/stringpiece.h +224 -0
  243. data/vendor/local/include/unicode/stringtriebuilder.h +402 -0
  244. data/vendor/local/include/unicode/stsearch.h +504 -0
  245. data/vendor/local/include/unicode/symtable.h +112 -0
  246. data/vendor/local/include/unicode/tblcoll.h +873 -0
  247. data/vendor/local/include/unicode/timezone.h +948 -0
  248. data/vendor/local/include/unicode/tmunit.h +129 -0
  249. data/vendor/local/include/unicode/tmutamt.h +168 -0
  250. data/vendor/local/include/unicode/tmutfmt.h +243 -0
  251. data/vendor/local/include/unicode/translit.h +1342 -0
  252. data/vendor/local/include/unicode/tzfmt.h +1098 -0
  253. data/vendor/local/include/unicode/tznames.h +404 -0
  254. data/vendor/local/include/unicode/tzrule.h +828 -0
  255. data/vendor/local/include/unicode/tztrans.h +195 -0
  256. data/vendor/local/include/unicode/ubidi.h +2186 -0
  257. data/vendor/local/include/unicode/ubrk.h +540 -0
  258. data/vendor/local/include/unicode/ucal.h +1560 -0
  259. data/vendor/local/include/unicode/ucasemap.h +423 -0
  260. data/vendor/local/include/unicode/ucat.h +158 -0
  261. data/vendor/local/include/unicode/uchar.h +3426 -0
  262. data/vendor/local/include/unicode/ucharstrie.h +576 -0
  263. data/vendor/local/include/unicode/ucharstriebuilder.h +185 -0
  264. data/vendor/local/include/unicode/uchriter.h +381 -0
  265. data/vendor/local/include/unicode/uclean.h +258 -0
  266. data/vendor/local/include/unicode/ucnv.h +2036 -0
  267. data/vendor/local/include/unicode/ucnv_cb.h +162 -0
  268. data/vendor/local/include/unicode/ucnv_err.h +463 -0
  269. data/vendor/local/include/unicode/ucnvsel.h +187 -0
  270. data/vendor/local/include/unicode/ucol.h +1474 -0
  271. data/vendor/local/include/unicode/ucoleitr.h +266 -0
  272. data/vendor/local/include/unicode/uconfig.h +430 -0
  273. data/vendor/local/include/unicode/ucsdet.h +413 -0
  274. data/vendor/local/include/unicode/ucurr.h +424 -0
  275. data/vendor/local/include/unicode/udat.h +1536 -0
  276. data/vendor/local/include/unicode/udata.h +430 -0
  277. data/vendor/local/include/unicode/udateintervalformat.h +181 -0
  278. data/vendor/local/include/unicode/udatpg.h +588 -0
  279. data/vendor/local/include/unicode/udisplaycontext.h +150 -0
  280. data/vendor/local/include/unicode/uenum.h +206 -0
  281. data/vendor/local/include/unicode/uformattable.h +280 -0
  282. data/vendor/local/include/unicode/ugender.h +82 -0
  283. data/vendor/local/include/unicode/uidna.h +762 -0
  284. data/vendor/local/include/unicode/uiter.h +707 -0
  285. data/vendor/local/include/unicode/uldnames.h +302 -0
  286. data/vendor/local/include/unicode/uloc.h +1256 -0
  287. data/vendor/local/include/unicode/ulocdata.h +277 -0
  288. data/vendor/local/include/unicode/umachine.h +356 -0
  289. data/vendor/local/include/unicode/umisc.h +60 -0
  290. data/vendor/local/include/unicode/umsg.h +623 -0
  291. data/vendor/local/include/unicode/unifilt.h +120 -0
  292. data/vendor/local/include/unicode/unifunct.h +125 -0
  293. data/vendor/local/include/unicode/unimatch.h +163 -0
  294. data/vendor/local/include/unicode/unirepl.h +97 -0
  295. data/vendor/local/include/unicode/uniset.h +1691 -0
  296. data/vendor/local/include/unicode/unistr.h +4470 -0
  297. data/vendor/local/include/unicode/unorm.h +561 -0
  298. data/vendor/local/include/unicode/unorm2.h +528 -0
  299. data/vendor/local/include/unicode/unum.h +1328 -0
  300. data/vendor/local/include/unicode/unumsys.h +170 -0
  301. data/vendor/local/include/unicode/uobject.h +320 -0
  302. data/vendor/local/include/unicode/upluralrules.h +145 -0
  303. data/vendor/local/include/unicode/uregex.h +1591 -0
  304. data/vendor/local/include/unicode/uregion.h +248 -0
  305. data/vendor/local/include/unicode/urename.h +1784 -0
  306. data/vendor/local/include/unicode/urep.h +155 -0
  307. data/vendor/local/include/unicode/ures.h +887 -0
  308. data/vendor/local/include/unicode/uscript.h +642 -0
  309. data/vendor/local/include/unicode/usearch.h +885 -0
  310. data/vendor/local/include/unicode/uset.h +1126 -0
  311. data/vendor/local/include/unicode/usetiter.h +318 -0
  312. data/vendor/local/include/unicode/ushape.h +474 -0
  313. data/vendor/local/include/unicode/uspoof.h +1064 -0
  314. data/vendor/local/include/unicode/usprep.h +269 -0
  315. data/vendor/local/include/unicode/ustdio.h +1018 -0
  316. data/vendor/local/include/unicode/ustream.h +68 -0
  317. data/vendor/local/include/unicode/ustring.h +1700 -0
  318. data/vendor/local/include/unicode/ustringtrie.h +95 -0
  319. data/vendor/local/include/unicode/utext.h +1600 -0
  320. data/vendor/local/include/unicode/utf.h +223 -0
  321. data/vendor/local/include/unicode/utf16.h +623 -0
  322. data/vendor/local/include/unicode/utf32.h +23 -0
  323. data/vendor/local/include/unicode/utf8.h +824 -0
  324. data/vendor/local/include/unicode/utf_old.h +1169 -0
  325. data/vendor/local/include/unicode/utmscale.h +481 -0
  326. data/vendor/local/include/unicode/utrace.h +359 -0
  327. data/vendor/local/include/unicode/utrans.h +658 -0
  328. data/vendor/local/include/unicode/utypes.h +723 -0
  329. data/vendor/local/include/unicode/uvernum.h +170 -0
  330. data/vendor/local/include/unicode/uversion.h +193 -0
  331. data/vendor/local/include/unicode/vtzone.h +455 -0
  332. data/vendor/local/lib/girepository-1.0/Pango-1.0.typelib +0 -0
  333. data/vendor/local/lib/girepository-1.0/PangoCairo-1.0.typelib +0 -0
  334. data/vendor/local/lib/girepository-1.0/PangoFT2-1.0.typelib +0 -0
  335. data/vendor/local/lib/icu/54.1/Makefile.inc +293 -0
  336. data/vendor/local/lib/icu/54.1/pkgdata.inc +17 -0
  337. data/vendor/local/lib/icu/Makefile.inc +293 -0
  338. data/vendor/local/lib/icu/pkgdata.inc +17 -0
  339. data/vendor/local/lib/icudt.dll +0 -0
  340. data/vendor/local/lib/icudt54.dll +0 -0
  341. data/vendor/local/lib/icuin.dll +0 -0
  342. data/vendor/local/lib/icuin54.dll +0 -0
  343. data/vendor/local/lib/icuio.dll +0 -0
  344. data/vendor/local/lib/icuio54.dll +0 -0
  345. data/vendor/local/lib/icule.dll +0 -0
  346. data/vendor/local/lib/icule54.dll +0 -0
  347. data/vendor/local/lib/iculx.dll +0 -0
  348. data/vendor/local/lib/iculx54.dll +0 -0
  349. data/vendor/local/lib/icutest.dll +0 -0
  350. data/vendor/local/lib/icutest54.dll +0 -0
  351. data/vendor/local/lib/icutu.dll +0 -0
  352. data/vendor/local/lib/icutu54.dll +0 -0
  353. data/vendor/local/lib/icuuc.dll +0 -0
  354. data/vendor/local/lib/icuuc54.dll +0 -0
  355. data/vendor/local/lib/libharfbuzz-icu.a +0 -0
  356. data/vendor/local/lib/libharfbuzz-icu.la +41 -0
  357. data/vendor/local/lib/libharfbuzz.dll.a +0 -0
  358. data/vendor/local/lib/libharfbuzz.la +41 -0
  359. data/vendor/local/lib/libicudt.dll.a +0 -0
  360. data/vendor/local/lib/libicuin.dll.a +0 -0
  361. data/vendor/local/lib/libicuio.dll.a +0 -0
  362. data/vendor/local/lib/libicule.dll.a +0 -0
  363. data/vendor/local/lib/libiculx.dll.a +0 -0
  364. data/vendor/local/lib/libicutest.dll.a +0 -0
  365. data/vendor/local/lib/libicutu.dll.a +0 -0
  366. data/vendor/local/lib/libicuuc.dll.a +0 -0
  367. data/vendor/local/lib/libpango-1.0.dll.a +0 -0
  368. data/vendor/local/lib/libpango-1.0.la +41 -0
  369. data/vendor/local/lib/libpangocairo-1.0.dll.a +0 -0
  370. data/vendor/local/lib/libpangocairo-1.0.la +41 -0
  371. data/vendor/local/lib/libpangoft2-1.0.dll.a +0 -0
  372. data/vendor/local/lib/libpangoft2-1.0.la +41 -0
  373. data/vendor/local/lib/libpangowin32-1.0.dll.a +0 -0
  374. data/vendor/local/lib/libpangowin32-1.0.la +41 -0
  375. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll +0 -0
  376. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll.a +0 -0
  377. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.la +41 -0
  378. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll +0 -0
  379. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll.a +0 -0
  380. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.la +41 -0
  381. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll +0 -0
  382. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll.a +0 -0
  383. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.la +41 -0
  384. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll +0 -0
  385. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll.a +0 -0
  386. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.la +41 -0
  387. data/vendor/local/lib/pkgconfig/harfbuzz-icu.pc +13 -0
  388. data/vendor/local/lib/pkgconfig/harfbuzz.pc +11 -0
  389. data/vendor/local/lib/pkgconfig/icu-i18n.pc +38 -0
  390. data/vendor/local/lib/pkgconfig/icu-io.pc +38 -0
  391. data/vendor/local/lib/pkgconfig/icu-le.pc +38 -0
  392. data/vendor/local/lib/pkgconfig/icu-lx.pc +38 -0
  393. data/vendor/local/lib/pkgconfig/icu-uc.pc +38 -0
  394. data/vendor/local/lib/pkgconfig/pango.pc +14 -0
  395. data/vendor/local/lib/pkgconfig/pangocairo.pc +11 -0
  396. data/vendor/local/lib/pkgconfig/pangoft2.pc +12 -0
  397. data/vendor/local/lib/pkgconfig/pangowin32.pc +11 -0
  398. data/vendor/local/share/gir-1.0/Pango-1.0.gir +13329 -0
  399. data/vendor/local/share/gir-1.0/PangoCairo-1.0.gir +833 -0
  400. data/vendor/local/share/gir-1.0/PangoFT2-1.0.gir +354 -0
  401. data/vendor/local/share/gtk-doc/html/harfbuzz/annotation-glossary.html +75 -0
  402. data/vendor/local/share/gtk-doc/html/harfbuzz/api-index-full.html +1449 -0
  403. data/vendor/local/share/gtk-doc/html/harfbuzz/ch01.html +98 -0
  404. data/vendor/local/share/gtk-doc/html/harfbuzz/deprecated-api-index.html +46 -0
  405. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-blob.html +610 -0
  406. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-buffer.html +1780 -0
  407. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-common.html +1337 -0
  408. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-coretext.html +144 -0
  409. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-deprecated.html +99 -0
  410. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-face.html +630 -0
  411. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-font.html +2529 -0
  412. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ft.html +188 -0
  413. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-glib.html +120 -0
  414. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-gobject.html +50 -0
  415. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-graphite2.html +120 -0
  416. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-icu.html +120 -0
  417. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-layout.html +771 -0
  418. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-tag.html +172 -0
  419. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot.html +50 -0
  420. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-set.html +966 -0
  421. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape-plan.html +405 -0
  422. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape.html +286 -0
  423. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-unicode.html +1523 -0
  424. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-uniscribe.html +100 -0
  425. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-version.html +182 -0
  426. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb.html +50 -0
  427. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz.devhelp2 +378 -0
  428. data/vendor/local/share/gtk-doc/html/harfbuzz/home.png +0 -0
  429. data/vendor/local/share/gtk-doc/html/harfbuzz/index.html +105 -0
  430. data/vendor/local/share/gtk-doc/html/harfbuzz/index.sgml +496 -0
  431. data/vendor/local/share/gtk-doc/html/harfbuzz/left-insensitive.png +0 -0
  432. data/vendor/local/share/gtk-doc/html/harfbuzz/left.png +0 -0
  433. data/vendor/local/share/gtk-doc/html/harfbuzz/object-tree.html +59 -0
  434. data/vendor/local/share/gtk-doc/html/harfbuzz/right-insensitive.png +0 -0
  435. data/vendor/local/share/gtk-doc/html/harfbuzz/right.png +0 -0
  436. data/vendor/local/share/gtk-doc/html/harfbuzz/style.css +476 -0
  437. data/vendor/local/share/gtk-doc/html/harfbuzz/up-insensitive.png +0 -0
  438. data/vendor/local/share/gtk-doc/html/harfbuzz/up.png +0 -0
  439. data/vendor/local/share/gtk-doc/html/pango/PangoEngineLang.html +224 -0
  440. data/vendor/local/share/gtk-doc/html/pango/PangoEngineShape.html +255 -0
  441. data/vendor/local/share/gtk-doc/html/pango/PangoFcDecoder.html +246 -0
  442. data/vendor/local/share/gtk-doc/html/pango/PangoFcFont.html +500 -0
  443. data/vendor/local/share/gtk-doc/html/pango/PangoFcFontMap.html +1001 -0
  444. data/vendor/local/share/gtk-doc/html/pango/PangoMarkupFormat.html +301 -0
  445. data/vendor/local/share/gtk-doc/html/pango/PangoRenderer.html +1219 -0
  446. data/vendor/local/share/gtk-doc/html/pango/annotation-glossary.html +89 -0
  447. data/vendor/local/share/gtk-doc/html/pango/api-index-1-10.html +135 -0
  448. data/vendor/local/share/gtk-doc/html/pango/api-index-1-12.html +49 -0
  449. data/vendor/local/share/gtk-doc/html/pango/api-index-1-14.html +64 -0
  450. data/vendor/local/share/gtk-doc/html/pango/api-index-1-16.html +228 -0
  451. data/vendor/local/share/gtk-doc/html/pango/api-index-1-18.html +152 -0
  452. data/vendor/local/share/gtk-doc/html/pango/api-index-1-2.html +122 -0
  453. data/vendor/local/share/gtk-doc/html/pango/api-index-1-20.html +87 -0
  454. data/vendor/local/share/gtk-doc/html/pango/api-index-1-22.html +124 -0
  455. data/vendor/local/share/gtk-doc/html/pango/api-index-1-24.html +97 -0
  456. data/vendor/local/share/gtk-doc/html/pango/api-index-1-26.html +46 -0
  457. data/vendor/local/share/gtk-doc/html/pango/api-index-1-30.html +39 -0
  458. data/vendor/local/share/gtk-doc/html/pango/api-index-1-31-0.html +39 -0
  459. data/vendor/local/share/gtk-doc/html/pango/api-index-1-32-4.html +53 -0
  460. data/vendor/local/share/gtk-doc/html/pango/api-index-1-32.html +42 -0
  461. data/vendor/local/share/gtk-doc/html/pango/api-index-1-34.html +38 -0
  462. data/vendor/local/share/gtk-doc/html/pango/api-index-1-4.html +201 -0
  463. data/vendor/local/share/gtk-doc/html/pango/api-index-1-6.html +165 -0
  464. data/vendor/local/share/gtk-doc/html/pango/api-index-1-8.html +171 -0
  465. data/vendor/local/share/gtk-doc/html/pango/api-index-deprecated.html +284 -0
  466. data/vendor/local/share/gtk-doc/html/pango/api-index-full.html +2968 -0
  467. data/vendor/local/share/gtk-doc/html/pango/home.png +0 -0
  468. data/vendor/local/share/gtk-doc/html/pango/index.html +146 -0
  469. data/vendor/local/share/gtk-doc/html/pango/index.sgml +957 -0
  470. data/vendor/local/share/gtk-doc/html/pango/layout.gif +0 -0
  471. data/vendor/local/share/gtk-doc/html/pango/left-insensitive.png +0 -0
  472. data/vendor/local/share/gtk-doc/html/pango/left.png +0 -0
  473. data/vendor/local/share/gtk-doc/html/pango/lowlevel.html +68 -0
  474. data/vendor/local/share/gtk-doc/html/pango/pango-Bidirectional-Text.html +514 -0
  475. data/vendor/local/share/gtk-doc/html/pango/pango-Cairo-Rendering.html +1632 -0
  476. data/vendor/local/share/gtk-doc/html/pango/pango-CoreText-Fonts.html +115 -0
  477. data/vendor/local/share/gtk-doc/html/pango/pango-Coverage-Maps.html +508 -0
  478. data/vendor/local/share/gtk-doc/html/pango/pango-Engines.html +358 -0
  479. data/vendor/local/share/gtk-doc/html/pango/pango-Fonts.html +4154 -0
  480. data/vendor/local/share/gtk-doc/html/pango/pango-FreeType-Fonts-and-Rendering.html +956 -0
  481. data/vendor/local/share/gtk-doc/html/pango/pango-Glyph-Storage.html +2627 -0
  482. data/vendor/local/share/gtk-doc/html/pango/pango-Layout-Objects.html +4153 -0
  483. data/vendor/local/share/gtk-doc/html/pango/pango-Miscellaneous-Utilities.html +965 -0
  484. data/vendor/local/share/gtk-doc/html/pango/pango-Modules.html +331 -0
  485. data/vendor/local/share/gtk-doc/html/pango/pango-OpenType-Font-Handling.html +2202 -0
  486. data/vendor/local/share/gtk-doc/html/pango/pango-Scripts-and-Languages.html +1430 -0
  487. data/vendor/local/share/gtk-doc/html/pango/pango-Tab-Stops.html +582 -0
  488. data/vendor/local/share/gtk-doc/html/pango/pango-Text-Attributes.html +3356 -0
  489. data/vendor/local/share/gtk-doc/html/pango/pango-Text-Processing.html +2079 -0
  490. data/vendor/local/share/gtk-doc/html/pango/pango-Version-Checking.html +325 -0
  491. data/vendor/local/share/gtk-doc/html/pango/pango-Vertical-Text.html +523 -0
  492. data/vendor/local/share/gtk-doc/html/pango/pango-Win32-Fonts-and-Rendering.html +1028 -0
  493. data/vendor/local/share/gtk-doc/html/pango/pango-Xft-Fonts-and-Rendering.html +1275 -0
  494. data/vendor/local/share/gtk-doc/html/pango/pango-hierarchy.html +91 -0
  495. data/vendor/local/share/gtk-doc/html/pango/pango-querymodules.html +131 -0
  496. data/vendor/local/share/gtk-doc/html/pango/pango.devhelp2 +786 -0
  497. data/vendor/local/share/gtk-doc/html/pango/pango.html +63 -0
  498. data/vendor/local/share/gtk-doc/html/pango/rendering.html +47 -0
  499. data/vendor/local/share/gtk-doc/html/pango/right-insensitive.png +0 -0
  500. data/vendor/local/share/gtk-doc/html/pango/right.png +0 -0
  501. data/vendor/local/share/gtk-doc/html/pango/rotated-text.png +0 -0
  502. data/vendor/local/share/gtk-doc/html/pango/style.css +476 -0
  503. data/vendor/local/share/gtk-doc/html/pango/tools.html +33 -0
  504. data/vendor/local/share/gtk-doc/html/pango/up-insensitive.png +0 -0
  505. data/vendor/local/share/gtk-doc/html/pango/up.png +0 -0
  506. data/vendor/local/share/icu/54.1/config/mh-mingw64 +158 -0
  507. data/vendor/local/share/icu/54.1/install-sh +251 -0
  508. data/vendor/local/share/icu/54.1/license.html +385 -0
  509. data/vendor/local/share/icu/54.1/mkinstalldirs +43 -0
  510. data/vendor/local/share/license/harfbuzz/AUTHORS +9 -0
  511. data/vendor/local/share/license/harfbuzz/COPYING +36 -0
  512. data/vendor/local/share/license/pango/AUTHORS +2 -0
  513. data/vendor/local/share/license/pango/COPYING +482 -0
  514. data/vendor/local/share/man/man1/derb.1 +196 -0
  515. data/vendor/local/share/man/man1/genbrk.1 +112 -0
  516. data/vendor/local/share/man/man1/gencfu.1 +91 -0
  517. data/vendor/local/share/man/man1/gencnval.1 +91 -0
  518. data/vendor/local/share/man/man1/gendict.1 +131 -0
  519. data/vendor/local/share/man/man1/genrb.1 +146 -0
  520. data/vendor/local/share/man/man1/icu-config.1 +288 -0
  521. data/vendor/local/share/man/man1/makeconv.1 +112 -0
  522. data/vendor/local/share/man/man1/pango-querymodules.1 +106 -0
  523. data/vendor/local/share/man/man1/pango-view.1 +1 -0
  524. data/vendor/local/share/man/man1/pkgdata.1 +258 -0
  525. data/vendor/local/share/man/man1/uconv.1 +443 -0
  526. data/vendor/local/share/man/man8/genccode.8 +106 -0
  527. data/vendor/local/share/man/man8/gencmn.8 +129 -0
  528. data/vendor/local/share/man/man8/gensprep.8 +102 -0
  529. data/vendor/local/share/man/man8/icupkg.8 +204 -0
  530. metadata +599 -0
@@ -0,0 +1,1536 @@
1
+ /*
2
+ *******************************************************************************
3
+ * Copyright (C) 1996-2014, International Business Machines
4
+ * Corporation and others. All Rights Reserved.
5
+ *******************************************************************************
6
+ */
7
+
8
+ #ifndef UDAT_H
9
+ #define UDAT_H
10
+
11
+ #include "unicode/utypes.h"
12
+
13
+ #if !UCONFIG_NO_FORMATTING
14
+
15
+ #include "unicode/localpointer.h"
16
+ #include "unicode/ucal.h"
17
+ #include "unicode/unum.h"
18
+ #include "unicode/udisplaycontext.h"
19
+ /**
20
+ * \file
21
+ * \brief C API: DateFormat
22
+ *
23
+ * <h2> Date Format C API</h2>
24
+ *
25
+ * Date Format C API consists of functions that convert dates and
26
+ * times from their internal representations to textual form and back again in a
27
+ * language-independent manner. Converting from the internal representation (milliseconds
28
+ * since midnight, January 1, 1970) to text is known as "formatting," and converting
29
+ * from text to millis is known as "parsing." We currently define only one concrete
30
+ * structure UDateFormat, which can handle pretty much all normal
31
+ * date formatting and parsing actions.
32
+ * <P>
33
+ * Date Format helps you to format and parse dates for any locale. Your code can
34
+ * be completely independent of the locale conventions for months, days of the
35
+ * week, or even the calendar format: lunar vs. solar.
36
+ * <P>
37
+ * To format a date for the current Locale with default time and date style,
38
+ * use one of the static factory methods:
39
+ * <pre>
40
+ * \code
41
+ * UErrorCode status = U_ZERO_ERROR;
42
+ * UChar *myString;
43
+ * int32_t myStrlen = 0;
44
+ * UDateFormat* dfmt = udat_open(UDAT_DEFAULT, UDAT_DEFAULT, NULL, NULL, -1, NULL, -1, &status);
45
+ * myStrlen = udat_format(dfmt, myDate, NULL, myStrlen, NULL, &status);
46
+ * if (status==U_BUFFER_OVERFLOW_ERROR){
47
+ * status=U_ZERO_ERROR;
48
+ * myString=(UChar*)malloc(sizeof(UChar) * (myStrlen+1) );
49
+ * udat_format(dfmt, myDate, myString, myStrlen+1, NULL, &status);
50
+ * }
51
+ * \endcode
52
+ * </pre>
53
+ * If you are formatting multiple numbers, it is more efficient to get the
54
+ * format and use it multiple times so that the system doesn't have to fetch the
55
+ * information about the local language and country conventions multiple times.
56
+ * <pre>
57
+ * \code
58
+ * UErrorCode status = U_ZERO_ERROR;
59
+ * int32_t i, myStrlen = 0;
60
+ * UChar* myString;
61
+ * char buffer[1024];
62
+ * UDate myDateArr[] = { 0.0, 100000000.0, 2000000000.0 }; // test values
63
+ * UDateFormat* df = udat_open(UDAT_DEFAULT, UDAT_DEFAULT, NULL, NULL, -1, NULL, 0, &status);
64
+ * for (i = 0; i < 3; i++) {
65
+ * myStrlen = udat_format(df, myDateArr[i], NULL, myStrlen, NULL, &status);
66
+ * if(status == U_BUFFER_OVERFLOW_ERROR){
67
+ * status = U_ZERO_ERROR;
68
+ * myString = (UChar*)malloc(sizeof(UChar) * (myStrlen+1) );
69
+ * udat_format(df, myDateArr[i], myString, myStrlen+1, NULL, &status);
70
+ * printf("%s\n", u_austrcpy(buffer, myString) );
71
+ * free(myString);
72
+ * }
73
+ * }
74
+ * \endcode
75
+ * </pre>
76
+ * To get specific fields of a date, you can use UFieldPosition to
77
+ * get specific fields.
78
+ * <pre>
79
+ * \code
80
+ * UErrorCode status = U_ZERO_ERROR;
81
+ * UFieldPosition pos;
82
+ * UChar *myString;
83
+ * int32_t myStrlen = 0;
84
+ * char buffer[1024];
85
+ *
86
+ * pos.field = 1; // Same as the DateFormat::EField enum
87
+ * UDateFormat* dfmt = udat_open(UDAT_DEFAULT, UDAT_DEFAULT, NULL, -1, NULL, 0, &status);
88
+ * myStrlen = udat_format(dfmt, myDate, NULL, myStrlen, &pos, &status);
89
+ * if (status==U_BUFFER_OVERFLOW_ERROR){
90
+ * status=U_ZERO_ERROR;
91
+ * myString=(UChar*)malloc(sizeof(UChar) * (myStrlen+1) );
92
+ * udat_format(dfmt, myDate, myString, myStrlen+1, &pos, &status);
93
+ * }
94
+ * printf("date format: %s\n", u_austrcpy(buffer, myString));
95
+ * buffer[pos.endIndex] = 0; // NULL terminate the string.
96
+ * printf("UFieldPosition position equals %s\n", &buffer[pos.beginIndex]);
97
+ * \endcode
98
+ * </pre>
99
+ * To format a date for a different Locale, specify it in the call to
100
+ * udat_open()
101
+ * <pre>
102
+ * \code
103
+ * UDateFormat* df = udat_open(UDAT_SHORT, UDAT_SHORT, "fr_FR", NULL, -1, NULL, 0, &status);
104
+ * \endcode
105
+ * </pre>
106
+ * You can use a DateFormat API udat_parse() to parse.
107
+ * <pre>
108
+ * \code
109
+ * UErrorCode status = U_ZERO_ERROR;
110
+ * int32_t parsepos=0;
111
+ * UDate myDate = udat_parse(df, myString, u_strlen(myString), &parsepos, &status);
112
+ * \endcode
113
+ * </pre>
114
+ * You can pass in different options for the arguments for date and time style
115
+ * to control the length of the result; from SHORT to MEDIUM to LONG to FULL.
116
+ * The exact result depends on the locale, but generally:
117
+ * see UDateFormatStyle for more details
118
+ * <ul type=round>
119
+ * <li> UDAT_SHORT is completely numeric, such as 12/13/52 or 3:30pm
120
+ * <li> UDAT_MEDIUM is longer, such as Jan 12, 1952
121
+ * <li> UDAT_LONG is longer, such as January 12, 1952 or 3:30:32pm
122
+ * <li> UDAT_FULL is pretty completely specified, such as
123
+ * Tuesday, April 12, 1952 AD or 3:30:42pm PST.
124
+ * </ul>
125
+ * You can also set the time zone on the format if you wish.
126
+ * <P>
127
+ * You can also use forms of the parse and format methods with Parse Position and
128
+ * UFieldPosition to allow you to
129
+ * <ul type=round>
130
+ * <li> Progressively parse through pieces of a string.
131
+ * <li> Align any particular field, or find out where it is for selection
132
+ * on the screen.
133
+ * </ul>
134
+ * <p><strong>Date and Time Patterns:</strong></p>
135
+ *
136
+ * <p>Date and time formats are specified by <em>date and time pattern</em> strings.
137
+ * Within date and time pattern strings, all unquoted ASCII letters [A-Za-z] are reserved
138
+ * as pattern letters representing calendar fields. <code>UDateFormat</code> supports
139
+ * the date and time formatting algorithm and pattern letters defined by
140
+ * <a href="http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table">UTS#35
141
+ * Unicode Locale Data Markup Language (LDML)</a> and further documented for ICU in the
142
+ * <a href="https://sites.google.com/site/icuprojectuserguide/formatparse/datetime?pli=1#TOC-Date-Field-Symbol-Table">ICU
143
+ * User Guide</a>.</p>
144
+ */
145
+
146
+ /** A date formatter.
147
+ * For usage in C programs.
148
+ * @stable ICU 2.6
149
+ */
150
+ typedef void* UDateFormat;
151
+
152
+ /** The possible date/time format styles
153
+ * @stable ICU 2.6
154
+ */
155
+ typedef enum UDateFormatStyle {
156
+ /** Full style */
157
+ UDAT_FULL,
158
+ /** Long style */
159
+ UDAT_LONG,
160
+ /** Medium style */
161
+ UDAT_MEDIUM,
162
+ /** Short style */
163
+ UDAT_SHORT,
164
+ /** Default style */
165
+ UDAT_DEFAULT = UDAT_MEDIUM,
166
+
167
+ /** Bitfield for relative date */
168
+ UDAT_RELATIVE = (1 << 7),
169
+
170
+ UDAT_FULL_RELATIVE = UDAT_FULL | UDAT_RELATIVE,
171
+
172
+ UDAT_LONG_RELATIVE = UDAT_LONG | UDAT_RELATIVE,
173
+
174
+ UDAT_MEDIUM_RELATIVE = UDAT_MEDIUM | UDAT_RELATIVE,
175
+
176
+ UDAT_SHORT_RELATIVE = UDAT_SHORT | UDAT_RELATIVE,
177
+
178
+
179
+ /** No style */
180
+ UDAT_NONE = -1,
181
+
182
+ /**
183
+ * Use the pattern given in the parameter to udat_open
184
+ * @see udat_open
185
+ * @stable ICU 50
186
+ */
187
+ UDAT_PATTERN = -2,
188
+
189
+ #ifndef U_HIDE_INTERNAL_API
190
+ /** @internal alias to UDAT_PATTERN */
191
+ UDAT_IGNORE = UDAT_PATTERN
192
+ #endif /* U_HIDE_INTERNAL_API */
193
+ } UDateFormatStyle;
194
+
195
+ /* Skeletons for dates. */
196
+
197
+ /**
198
+ * Constant for date skeleton with year.
199
+ * @stable ICU 4.0
200
+ */
201
+ #define UDAT_YEAR "y"
202
+ /**
203
+ * Constant for date skeleton with quarter.
204
+ * @stable ICU 51
205
+ */
206
+ #define UDAT_QUARTER "QQQQ"
207
+ /**
208
+ * Constant for date skeleton with abbreviated quarter.
209
+ * @stable ICU 51
210
+ */
211
+ #define UDAT_ABBR_QUARTER "QQQ"
212
+ /**
213
+ * Constant for date skeleton with year and quarter.
214
+ * @stable ICU 4.0
215
+ */
216
+ #define UDAT_YEAR_QUARTER "yQQQQ"
217
+ /**
218
+ * Constant for date skeleton with year and abbreviated quarter.
219
+ * @stable ICU 4.0
220
+ */
221
+ #define UDAT_YEAR_ABBR_QUARTER "yQQQ"
222
+ /**
223
+ * Constant for date skeleton with month.
224
+ * @stable ICU 4.0
225
+ */
226
+ #define UDAT_MONTH "MMMM"
227
+ /**
228
+ * Constant for date skeleton with abbreviated month.
229
+ * @stable ICU 4.0
230
+ */
231
+ #define UDAT_ABBR_MONTH "MMM"
232
+ /**
233
+ * Constant for date skeleton with numeric month.
234
+ * @stable ICU 4.0
235
+ */
236
+ #define UDAT_NUM_MONTH "M"
237
+ /**
238
+ * Constant for date skeleton with year and month.
239
+ * @stable ICU 4.0
240
+ */
241
+ #define UDAT_YEAR_MONTH "yMMMM"
242
+ /**
243
+ * Constant for date skeleton with year and abbreviated month.
244
+ * @stable ICU 4.0
245
+ */
246
+ #define UDAT_YEAR_ABBR_MONTH "yMMM"
247
+ /**
248
+ * Constant for date skeleton with year and numeric month.
249
+ * @stable ICU 4.0
250
+ */
251
+ #define UDAT_YEAR_NUM_MONTH "yM"
252
+ /**
253
+ * Constant for date skeleton with day.
254
+ * @stable ICU 4.0
255
+ */
256
+ #define UDAT_DAY "d"
257
+ /**
258
+ * Constant for date skeleton with year, month, and day.
259
+ * Used in combinations date + time, date + time + zone, or time + zone.
260
+ * @stable ICU 4.0
261
+ */
262
+ #define UDAT_YEAR_MONTH_DAY "yMMMMd"
263
+ /**
264
+ * Constant for date skeleton with year, abbreviated month, and day.
265
+ * Used in combinations date + time, date + time + zone, or time + zone.
266
+ * @stable ICU 4.0
267
+ */
268
+ #define UDAT_YEAR_ABBR_MONTH_DAY "yMMMd"
269
+ /**
270
+ * Constant for date skeleton with year, numeric month, and day.
271
+ * Used in combinations date + time, date + time + zone, or time + zone.
272
+ * @stable ICU 4.0
273
+ */
274
+ #define UDAT_YEAR_NUM_MONTH_DAY "yMd"
275
+ /**
276
+ * Constant for date skeleton with weekday.
277
+ * @stable ICU 51
278
+ */
279
+ #define UDAT_WEEKDAY "EEEE"
280
+ /**
281
+ * Constant for date skeleton with abbreviated weekday.
282
+ * @stable ICU 51
283
+ */
284
+ #define UDAT_ABBR_WEEKDAY "E"
285
+ /**
286
+ * Constant for date skeleton with year, month, weekday, and day.
287
+ * Used in combinations date + time, date + time + zone, or time + zone.
288
+ * @stable ICU 4.0
289
+ */
290
+ #define UDAT_YEAR_MONTH_WEEKDAY_DAY "yMMMMEEEEd"
291
+ /**
292
+ * Constant for date skeleton with year, abbreviated month, weekday, and day.
293
+ * Used in combinations date + time, date + time + zone, or time + zone.
294
+ * @stable ICU 4.0
295
+ */
296
+ #define UDAT_YEAR_ABBR_MONTH_WEEKDAY_DAY "yMMMEd"
297
+ /**
298
+ * Constant for date skeleton with year, numeric month, weekday, and day.
299
+ * Used in combinations date + time, date + time + zone, or time + zone.
300
+ * @stable ICU 4.0
301
+ */
302
+ #define UDAT_YEAR_NUM_MONTH_WEEKDAY_DAY "yMEd"
303
+ /**
304
+ * Constant for date skeleton with long month and day.
305
+ * Used in combinations date + time, date + time + zone, or time + zone.
306
+ * @stable ICU 4.0
307
+ */
308
+ #define UDAT_MONTH_DAY "MMMMd"
309
+ /**
310
+ * Constant for date skeleton with abbreviated month and day.
311
+ * Used in combinations date + time, date + time + zone, or time + zone.
312
+ * @stable ICU 4.0
313
+ */
314
+ #define UDAT_ABBR_MONTH_DAY "MMMd"
315
+ /**
316
+ * Constant for date skeleton with numeric month and day.
317
+ * Used in combinations date + time, date + time + zone, or time + zone.
318
+ * @stable ICU 4.0
319
+ */
320
+ #define UDAT_NUM_MONTH_DAY "Md"
321
+ /**
322
+ * Constant for date skeleton with month, weekday, and day.
323
+ * Used in combinations date + time, date + time + zone, or time + zone.
324
+ * @stable ICU 4.0
325
+ */
326
+ #define UDAT_MONTH_WEEKDAY_DAY "MMMMEEEEd"
327
+ /**
328
+ * Constant for date skeleton with abbreviated month, weekday, and day.
329
+ * Used in combinations date + time, date + time + zone, or time + zone.
330
+ * @stable ICU 4.0
331
+ */
332
+ #define UDAT_ABBR_MONTH_WEEKDAY_DAY "MMMEd"
333
+ /**
334
+ * Constant for date skeleton with numeric month, weekday, and day.
335
+ * Used in combinations date + time, date + time + zone, or time + zone.
336
+ * @stable ICU 4.0
337
+ */
338
+ #define UDAT_NUM_MONTH_WEEKDAY_DAY "MEd"
339
+
340
+ /* Skeletons for times. */
341
+
342
+ /**
343
+ * Constant for date skeleton with hour, with the locale's preferred hour format (12 or 24).
344
+ * @stable ICU 4.0
345
+ */
346
+ #define UDAT_HOUR "j"
347
+ /**
348
+ * Constant for date skeleton with hour in 24-hour presentation.
349
+ * @stable ICU 51
350
+ */
351
+ #define UDAT_HOUR24 "H"
352
+ /**
353
+ * Constant for date skeleton with minute.
354
+ * @stable ICU 51
355
+ */
356
+ #define UDAT_MINUTE "m"
357
+ /**
358
+ * Constant for date skeleton with hour and minute, with the locale's preferred hour format (12 or 24).
359
+ * Used in combinations date + time, date + time + zone, or time + zone.
360
+ * @stable ICU 4.0
361
+ */
362
+ #define UDAT_HOUR_MINUTE "jm"
363
+ /**
364
+ * Constant for date skeleton with hour and minute in 24-hour presentation.
365
+ * Used in combinations date + time, date + time + zone, or time + zone.
366
+ * @stable ICU 4.0
367
+ */
368
+ #define UDAT_HOUR24_MINUTE "Hm"
369
+ /**
370
+ * Constant for date skeleton with second.
371
+ * @stable ICU 51
372
+ */
373
+ #define UDAT_SECOND "s"
374
+ /**
375
+ * Constant for date skeleton with hour, minute, and second,
376
+ * with the locale's preferred hour format (12 or 24).
377
+ * Used in combinations date + time, date + time + zone, or time + zone.
378
+ * @stable ICU 4.0
379
+ */
380
+ #define UDAT_HOUR_MINUTE_SECOND "jms"
381
+ /**
382
+ * Constant for date skeleton with hour, minute, and second in
383
+ * 24-hour presentation.
384
+ * Used in combinations date + time, date + time + zone, or time + zone.
385
+ * @stable ICU 4.0
386
+ */
387
+ #define UDAT_HOUR24_MINUTE_SECOND "Hms"
388
+ /**
389
+ * Constant for date skeleton with minute and second.
390
+ * Used in combinations date + time, date + time + zone, or time + zone.
391
+ * @stable ICU 4.0
392
+ */
393
+ #define UDAT_MINUTE_SECOND "ms"
394
+
395
+ /* Skeletons for time zones. */
396
+
397
+ /**
398
+ * Constant for <i>generic location format</i>, such as Los Angeles Time;
399
+ * used in combinations date + time + zone, or time + zone.
400
+ * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a>
401
+ * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
402
+ * @stable ICU 51
403
+ */
404
+ #define UDAT_LOCATION_TZ "VVVV"
405
+ /**
406
+ * Constant for <i>generic non-location format</i>, such as Pacific Time;
407
+ * used in combinations date + time + zone, or time + zone.
408
+ * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a>
409
+ * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
410
+ * @stable ICU 51
411
+ */
412
+ #define UDAT_GENERIC_TZ "vvvv"
413
+ /**
414
+ * Constant for <i>generic non-location format</i>, abbreviated if possible, such as PT;
415
+ * used in combinations date + time + zone, or time + zone.
416
+ * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a>
417
+ * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
418
+ * @stable ICU 51
419
+ */
420
+ #define UDAT_ABBR_GENERIC_TZ "v"
421
+ /**
422
+ * Constant for <i>specific non-location format</i>, such as Pacific Daylight Time;
423
+ * used in combinations date + time + zone, or time + zone.
424
+ * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a>
425
+ * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
426
+ * @stable ICU 51
427
+ */
428
+ #define UDAT_SPECIFIC_TZ "zzzz"
429
+ /**
430
+ * Constant for <i>specific non-location format</i>, abbreviated if possible, such as PDT;
431
+ * used in combinations date + time + zone, or time + zone.
432
+ * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a>
433
+ * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
434
+ * @stable ICU 51
435
+ */
436
+ #define UDAT_ABBR_SPECIFIC_TZ "z"
437
+ /**
438
+ * Constant for <i>localized GMT/UTC format</i>, such as GMT+8:00 or HPG-8:00;
439
+ * used in combinations date + time + zone, or time + zone.
440
+ * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a>
441
+ * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
442
+ * @stable ICU 51
443
+ */
444
+ #define UDAT_ABBR_UTC_TZ "ZZZZ"
445
+
446
+ /* deprecated skeleton constants */
447
+
448
+ #ifndef U_HIDE_DEPRECATED_API
449
+ /**
450
+ * Constant for date skeleton with standalone month.
451
+ * @deprecated ICU 50 Use UDAT_MONTH instead.
452
+ */
453
+ #define UDAT_STANDALONE_MONTH "LLLL"
454
+ /**
455
+ * Constant for date skeleton with standalone abbreviated month.
456
+ * @deprecated ICU 50 Use UDAT_ABBR_MONTH instead.
457
+ */
458
+ #define UDAT_ABBR_STANDALONE_MONTH "LLL"
459
+
460
+ /**
461
+ * Constant for date skeleton with hour, minute, and generic timezone.
462
+ * @deprecated ICU 50 Use instead UDAT_HOUR_MINUTE UDAT_ABBR_GENERIC_TZ or some other timezone presentation.
463
+ */
464
+ #define UDAT_HOUR_MINUTE_GENERIC_TZ "jmv"
465
+ /**
466
+ * Constant for date skeleton with hour, minute, and timezone.
467
+ * @deprecated ICU 50 Use instead UDAT_HOUR_MINUTE UDAT_ABBR_SPECIFIC_TZ or some other timezone presentation.
468
+ */
469
+ #define UDAT_HOUR_MINUTE_TZ "jmz"
470
+ /**
471
+ * Constant for date skeleton with hour and generic timezone.
472
+ * @deprecated ICU 50 Use instead UDAT_HOUR UDAT_ABBR_GENERIC_TZ or some other timezone presentation.
473
+ */
474
+ #define UDAT_HOUR_GENERIC_TZ "jv"
475
+ /**
476
+ * Constant for date skeleton with hour and timezone.
477
+ * @deprecated ICU 50 Use instead UDAT_HOUR UDAT_ABBR_SPECIFIC_TZ or some other timezone presentation.
478
+ */
479
+ #define UDAT_HOUR_TZ "jz"
480
+ #endif /* U_HIDE_DEPRECATED_API */
481
+
482
+ /**
483
+ * FieldPosition and UFieldPosition selectors for format fields
484
+ * defined by DateFormat and UDateFormat.
485
+ * @stable ICU 3.0
486
+ */
487
+ typedef enum UDateFormatField {
488
+ /**
489
+ * FieldPosition and UFieldPosition selector for 'G' field alignment,
490
+ * corresponding to the UCAL_ERA field.
491
+ * @stable ICU 3.0
492
+ */
493
+ UDAT_ERA_FIELD = 0,
494
+
495
+ /**
496
+ * FieldPosition and UFieldPosition selector for 'y' field alignment,
497
+ * corresponding to the UCAL_YEAR field.
498
+ * @stable ICU 3.0
499
+ */
500
+ UDAT_YEAR_FIELD = 1,
501
+
502
+ /**
503
+ * FieldPosition and UFieldPosition selector for 'M' field alignment,
504
+ * corresponding to the UCAL_MONTH field.
505
+ * @stable ICU 3.0
506
+ */
507
+ UDAT_MONTH_FIELD = 2,
508
+
509
+ /**
510
+ * FieldPosition and UFieldPosition selector for 'd' field alignment,
511
+ * corresponding to the UCAL_DATE field.
512
+ * @stable ICU 3.0
513
+ */
514
+ UDAT_DATE_FIELD = 3,
515
+
516
+ /**
517
+ * FieldPosition and UFieldPosition selector for 'k' field alignment,
518
+ * corresponding to the UCAL_HOUR_OF_DAY field.
519
+ * UDAT_HOUR_OF_DAY1_FIELD is used for the one-based 24-hour clock.
520
+ * For example, 23:59 + 01:00 results in 24:59.
521
+ * @stable ICU 3.0
522
+ */
523
+ UDAT_HOUR_OF_DAY1_FIELD = 4,
524
+
525
+ /**
526
+ * FieldPosition and UFieldPosition selector for 'H' field alignment,
527
+ * corresponding to the UCAL_HOUR_OF_DAY field.
528
+ * UDAT_HOUR_OF_DAY0_FIELD is used for the zero-based 24-hour clock.
529
+ * For example, 23:59 + 01:00 results in 00:59.
530
+ * @stable ICU 3.0
531
+ */
532
+ UDAT_HOUR_OF_DAY0_FIELD = 5,
533
+
534
+ /**
535
+ * FieldPosition and UFieldPosition selector for 'm' field alignment,
536
+ * corresponding to the UCAL_MINUTE field.
537
+ * @stable ICU 3.0
538
+ */
539
+ UDAT_MINUTE_FIELD = 6,
540
+
541
+ /**
542
+ * FieldPosition and UFieldPosition selector for 's' field alignment,
543
+ * corresponding to the UCAL_SECOND field.
544
+ * @stable ICU 3.0
545
+ */
546
+ UDAT_SECOND_FIELD = 7,
547
+
548
+ /**
549
+ * FieldPosition and UFieldPosition selector for 'S' field alignment,
550
+ * corresponding to the UCAL_MILLISECOND field.
551
+ *
552
+ * Note: Time formats that use 'S' can display a maximum of three
553
+ * significant digits for fractional seconds, corresponding to millisecond
554
+ * resolution and a fractional seconds sub-pattern of SSS. If the
555
+ * sub-pattern is S or SS, the fractional seconds value will be truncated
556
+ * (not rounded) to the number of display places specified. If the
557
+ * fractional seconds sub-pattern is longer than SSS, the additional
558
+ * display places will be filled with zeros.
559
+ * @stable ICU 3.0
560
+ */
561
+ UDAT_FRACTIONAL_SECOND_FIELD = 8,
562
+
563
+ /**
564
+ * FieldPosition and UFieldPosition selector for 'E' field alignment,
565
+ * corresponding to the UCAL_DAY_OF_WEEK field.
566
+ * @stable ICU 3.0
567
+ */
568
+ UDAT_DAY_OF_WEEK_FIELD = 9,
569
+
570
+ /**
571
+ * FieldPosition and UFieldPosition selector for 'D' field alignment,
572
+ * corresponding to the UCAL_DAY_OF_YEAR field.
573
+ * @stable ICU 3.0
574
+ */
575
+ UDAT_DAY_OF_YEAR_FIELD = 10,
576
+
577
+ /**
578
+ * FieldPosition and UFieldPosition selector for 'F' field alignment,
579
+ * corresponding to the UCAL_DAY_OF_WEEK_IN_MONTH field.
580
+ * @stable ICU 3.0
581
+ */
582
+ UDAT_DAY_OF_WEEK_IN_MONTH_FIELD = 11,
583
+
584
+ /**
585
+ * FieldPosition and UFieldPosition selector for 'w' field alignment,
586
+ * corresponding to the UCAL_WEEK_OF_YEAR field.
587
+ * @stable ICU 3.0
588
+ */
589
+ UDAT_WEEK_OF_YEAR_FIELD = 12,
590
+
591
+ /**
592
+ * FieldPosition and UFieldPosition selector for 'W' field alignment,
593
+ * corresponding to the UCAL_WEEK_OF_MONTH field.
594
+ * @stable ICU 3.0
595
+ */
596
+ UDAT_WEEK_OF_MONTH_FIELD = 13,
597
+
598
+ /**
599
+ * FieldPosition and UFieldPosition selector for 'a' field alignment,
600
+ * corresponding to the UCAL_AM_PM field.
601
+ * @stable ICU 3.0
602
+ */
603
+ UDAT_AM_PM_FIELD = 14,
604
+
605
+ /**
606
+ * FieldPosition and UFieldPosition selector for 'h' field alignment,
607
+ * corresponding to the UCAL_HOUR field.
608
+ * UDAT_HOUR1_FIELD is used for the one-based 12-hour clock.
609
+ * For example, 11:30 PM + 1 hour results in 12:30 AM.
610
+ * @stable ICU 3.0
611
+ */
612
+ UDAT_HOUR1_FIELD = 15,
613
+
614
+ /**
615
+ * FieldPosition and UFieldPosition selector for 'K' field alignment,
616
+ * corresponding to the UCAL_HOUR field.
617
+ * UDAT_HOUR0_FIELD is used for the zero-based 12-hour clock.
618
+ * For example, 11:30 PM + 1 hour results in 00:30 AM.
619
+ * @stable ICU 3.0
620
+ */
621
+ UDAT_HOUR0_FIELD = 16,
622
+
623
+ /**
624
+ * FieldPosition and UFieldPosition selector for 'z' field alignment,
625
+ * corresponding to the UCAL_ZONE_OFFSET and
626
+ * UCAL_DST_OFFSET fields.
627
+ * @stable ICU 3.0
628
+ */
629
+ UDAT_TIMEZONE_FIELD = 17,
630
+
631
+ /**
632
+ * FieldPosition and UFieldPosition selector for 'Y' field alignment,
633
+ * corresponding to the UCAL_YEAR_WOY field.
634
+ * @stable ICU 3.0
635
+ */
636
+ UDAT_YEAR_WOY_FIELD = 18,
637
+
638
+ /**
639
+ * FieldPosition and UFieldPosition selector for 'e' field alignment,
640
+ * corresponding to the UCAL_DOW_LOCAL field.
641
+ * @stable ICU 3.0
642
+ */
643
+ UDAT_DOW_LOCAL_FIELD = 19,
644
+
645
+ /**
646
+ * FieldPosition and UFieldPosition selector for 'u' field alignment,
647
+ * corresponding to the UCAL_EXTENDED_YEAR field.
648
+ * @stable ICU 3.0
649
+ */
650
+ UDAT_EXTENDED_YEAR_FIELD = 20,
651
+
652
+ /**
653
+ * FieldPosition and UFieldPosition selector for 'g' field alignment,
654
+ * corresponding to the UCAL_JULIAN_DAY field.
655
+ * @stable ICU 3.0
656
+ */
657
+ UDAT_JULIAN_DAY_FIELD = 21,
658
+
659
+ /**
660
+ * FieldPosition and UFieldPosition selector for 'A' field alignment,
661
+ * corresponding to the UCAL_MILLISECONDS_IN_DAY field.
662
+ * @stable ICU 3.0
663
+ */
664
+ UDAT_MILLISECONDS_IN_DAY_FIELD = 22,
665
+
666
+ /**
667
+ * FieldPosition and UFieldPosition selector for 'Z' field alignment,
668
+ * corresponding to the UCAL_ZONE_OFFSET and
669
+ * UCAL_DST_OFFSET fields.
670
+ * @stable ICU 3.0
671
+ */
672
+ UDAT_TIMEZONE_RFC_FIELD = 23,
673
+
674
+ /**
675
+ * FieldPosition and UFieldPosition selector for 'v' field alignment,
676
+ * corresponding to the UCAL_ZONE_OFFSET field.
677
+ * @stable ICU 3.4
678
+ */
679
+ UDAT_TIMEZONE_GENERIC_FIELD = 24,
680
+ /**
681
+ * FieldPosition selector for 'c' field alignment,
682
+ * corresponding to the {@link #UCAL_DOW_LOCAL} field.
683
+ * This displays the stand alone day name, if available.
684
+ * @stable ICU 3.4
685
+ */
686
+ UDAT_STANDALONE_DAY_FIELD = 25,
687
+
688
+ /**
689
+ * FieldPosition selector for 'L' field alignment,
690
+ * corresponding to the {@link #UCAL_MONTH} field.
691
+ * This displays the stand alone month name, if available.
692
+ * @stable ICU 3.4
693
+ */
694
+ UDAT_STANDALONE_MONTH_FIELD = 26,
695
+
696
+ /**
697
+ * FieldPosition selector for "Q" field alignment,
698
+ * corresponding to quarters. This is implemented
699
+ * using the {@link #UCAL_MONTH} field. This
700
+ * displays the quarter.
701
+ * @stable ICU 3.6
702
+ */
703
+ UDAT_QUARTER_FIELD = 27,
704
+
705
+ /**
706
+ * FieldPosition selector for the "q" field alignment,
707
+ * corresponding to stand-alone quarters. This is
708
+ * implemented using the {@link #UCAL_MONTH} field.
709
+ * This displays the stand-alone quarter.
710
+ * @stable ICU 3.6
711
+ */
712
+ UDAT_STANDALONE_QUARTER_FIELD = 28,
713
+
714
+ /**
715
+ * FieldPosition and UFieldPosition selector for 'V' field alignment,
716
+ * corresponding to the UCAL_ZONE_OFFSET field.
717
+ * @stable ICU 3.8
718
+ */
719
+ UDAT_TIMEZONE_SPECIAL_FIELD = 29,
720
+
721
+ /**
722
+ * FieldPosition selector for "U" field alignment,
723
+ * corresponding to cyclic year names. This is implemented
724
+ * using the {@link #UCAL_YEAR} field. This displays
725
+ * the cyclic year name, if available.
726
+ * @stable ICU 49
727
+ */
728
+ UDAT_YEAR_NAME_FIELD = 30,
729
+
730
+ /**
731
+ * FieldPosition selector for 'O' field alignment,
732
+ * corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OFFSETfields.
733
+ * This displays the localized GMT format.
734
+ * @stable ICU 51
735
+ */
736
+ UDAT_TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD = 31,
737
+
738
+ /**
739
+ * FieldPosition selector for 'X' field alignment,
740
+ * corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OFFSETfields.
741
+ * This displays the ISO 8601 local time offset format or UTC indicator ("Z").
742
+ * @stable ICU 51
743
+ */
744
+ UDAT_TIMEZONE_ISO_FIELD = 32,
745
+
746
+ /**
747
+ * FieldPosition selector for 'x' field alignment,
748
+ * corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OFFSET fields.
749
+ * This displays the ISO 8601 local time offset format.
750
+ * @stable ICU 51
751
+ */
752
+ UDAT_TIMEZONE_ISO_LOCAL_FIELD = 33,
753
+
754
+ #ifndef U_HIDE_INTERNAL_API
755
+ /**
756
+ * FieldPosition and UFieldPosition selector for 'r' field alignment,
757
+ * no directly corresponding UCAL_ field.
758
+ * @internal ICU 53
759
+ */
760
+ UDAT_RELATED_YEAR_FIELD = 34,
761
+ #endif /* U_HIDE_INTERNAL_API */
762
+
763
+ /**
764
+ * Number of FieldPosition and UFieldPosition selectors for
765
+ * DateFormat and UDateFormat.
766
+ * Valid selectors range from 0 to UDAT_FIELD_COUNT-1.
767
+ * This value is subject to change if new fields are defined
768
+ * in the future.
769
+ * @stable ICU 3.0
770
+ */
771
+ UDAT_FIELD_COUNT = 35
772
+
773
+ } UDateFormatField;
774
+
775
+
776
+ /**
777
+ * Maps from a UDateFormatField to the corresponding UCalendarDateFields.
778
+ * Note: since the mapping is many-to-one, there is no inverse mapping.
779
+ * @param field the UDateFormatField.
780
+ * @return the UCalendarDateField. This will be UCAL_FIELD_COUNT in case
781
+ * of error (e.g., the input field is UDAT_FIELD_COUNT).
782
+ * @stable ICU 4.4
783
+ */
784
+ U_STABLE UCalendarDateFields U_EXPORT2
785
+ udat_toCalendarDateField(UDateFormatField field);
786
+
787
+
788
+ /**
789
+ * Open a new UDateFormat for formatting and parsing dates and times.
790
+ * A UDateFormat may be used to format dates in calls to {@link #udat_format },
791
+ * and to parse dates in calls to {@link #udat_parse }.
792
+ * @param timeStyle The style used to format times; one of UDAT_FULL, UDAT_LONG,
793
+ * UDAT_MEDIUM, UDAT_SHORT, UDAT_DEFAULT, or UDAT_NONE (relative time styles
794
+ * are not currently supported).
795
+ * When the pattern parameter is used, pass in UDAT_PATTERN for both timeStyle and dateStyle.
796
+ * @param dateStyle The style used to format dates; one of UDAT_FULL, UDAT_LONG,
797
+ * UDAT_MEDIUM, UDAT_SHORT, UDAT_DEFAULT, UDAT_FULL_RELATIVE, UDAT_LONG_RELATIVE,
798
+ * UDAT_MEDIUM_RELATIVE, UDAT_SHORT_RELATIVE, or UDAT_NONE.
799
+ * When the pattern parameter is used, pass in UDAT_PATTERN for both timeStyle and dateStyle.
800
+ * As currently implemented,
801
+ * relative date formatting only affects a limited range of calendar days before or
802
+ * after the current date, based on the CLDR &lt;field type="day"&gt;/&lt;relative&gt; data: For
803
+ * example, in English, "Yesterday", "Today", and "Tomorrow". Outside of this range,
804
+ * dates are formatted using the corresponding non-relative style.
805
+ * @param locale The locale specifying the formatting conventions
806
+ * @param tzID A timezone ID specifying the timezone to use. If 0, use
807
+ * the default timezone.
808
+ * @param tzIDLength The length of tzID, or -1 if null-terminated.
809
+ * @param pattern A pattern specifying the format to use.
810
+ * @param patternLength The number of characters in the pattern, or -1 if null-terminated.
811
+ * @param status A pointer to an UErrorCode to receive any errors
812
+ * @return A pointer to a UDateFormat to use for formatting dates and times, or 0 if
813
+ * an error occurred.
814
+ * @stable ICU 2.0
815
+ */
816
+ U_STABLE UDateFormat* U_EXPORT2
817
+ udat_open(UDateFormatStyle timeStyle,
818
+ UDateFormatStyle dateStyle,
819
+ const char *locale,
820
+ const UChar *tzID,
821
+ int32_t tzIDLength,
822
+ const UChar *pattern,
823
+ int32_t patternLength,
824
+ UErrorCode *status);
825
+
826
+
827
+ /**
828
+ * Close a UDateFormat.
829
+ * Once closed, a UDateFormat may no longer be used.
830
+ * @param format The formatter to close.
831
+ * @stable ICU 2.0
832
+ */
833
+ U_STABLE void U_EXPORT2
834
+ udat_close(UDateFormat* format);
835
+
836
+
837
+ /* Dont hide UDateFormatBooleanAttribute type with #ifndef U_HIDE_DRAFT_API, needed by virtual methods */
838
+ /* Also don't hide UDAT_BOOLEAN_ATTRIBUTE_COUNT, needed by template class EnumSet<UDateFormatBooleanAttribute,...> */
839
+ /**
840
+ * DateFormat boolean attributes
841
+ *
842
+ * @draft ICU 53
843
+ */
844
+ typedef enum UDateFormatBooleanAttribute {
845
+ #ifndef U_HIDE_DRAFT_API
846
+ /**
847
+ * indicates whether whitespace is allowed. Includes trailing dot tolerance.
848
+ * @draft ICU 53
849
+ */
850
+ UDAT_PARSE_ALLOW_WHITESPACE = 0,
851
+ /**
852
+ * indicates tolerance of numeric data when String data may be assumed. eg: UDAT_YEAR_NAME_FIELD,
853
+ * UDAT_STANDALONE_MONTH_FIELD, UDAT_DAY_OF_WEEK_FIELD
854
+ * @draft ICU 53
855
+ */
856
+ UDAT_PARSE_ALLOW_NUMERIC = 1,
857
+ /**
858
+ * indicates tolerance of a partial literal match
859
+ * @draft ICU 53
860
+ */
861
+ UDAT_PARSE_PARTIAL_MATCH = 2,
862
+ /**
863
+ * indicates tolerance of pattern mismatch between input data and specified format pattern.
864
+ * e.g. accepting "September" for a month pattern of MMM ("Sep")
865
+ * @draft ICU 53
866
+ */
867
+ UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH = 3,
868
+ #endif /* U_HIDE_DRAFT_API */
869
+ /**
870
+ * count boolean date format constants
871
+ * @draft ICU 53
872
+ */
873
+ UDAT_BOOLEAN_ATTRIBUTE_COUNT = 4
874
+ } UDateFormatBooleanAttribute;
875
+
876
+ #ifndef U_HIDE_DRAFT_API
877
+ /**
878
+ * Get a boolean attribute associated with a UDateFormat.
879
+ * An example would be a true value for a key of UDAT_PARSE_ALLOW_WHITESPACE indicating allowing whitespace leniency.
880
+ * If the formatter does not understand the attribute, -1 is returned.
881
+ * @param fmt The formatter to query.
882
+ * @param attr The attribute to query; e.g. UDAT_PARSE_ALLOW_WHITESPACE.
883
+ * @param status A pointer to an UErrorCode to receive any errors
884
+ * @return The value of attr.
885
+ * @draft ICU 53
886
+ */
887
+ U_DRAFT UBool U_EXPORT2
888
+ udat_getBooleanAttribute(const UDateFormat* fmt, UDateFormatBooleanAttribute attr, UErrorCode* status);
889
+
890
+ /**
891
+ * Set a boolean attribute associated with a UDateFormat.
892
+ * An example of a boolean attribute is parse leniency control. If the formatter does not understand
893
+ * the attribute, the call is ignored.
894
+ * @param fmt The formatter to set.
895
+ * @param attr The attribute to set; one of UDAT_PARSE_ALLOW_WHITESPACE or UDAT_PARSE_ALLOW_NUMERIC
896
+ * @param newValue The new value of attr.
897
+ * @param status A pointer to an UErrorCode to receive any errors
898
+ * @draft ICU 53
899
+ */
900
+ U_DRAFT void U_EXPORT2
901
+ udat_setBooleanAttribute(UDateFormat *fmt, UDateFormatBooleanAttribute attr, UBool newValue, UErrorCode* status);
902
+
903
+ #endif /* U_HIDE_DRAFT_API */
904
+
905
+
906
+
907
+ #if U_SHOW_CPLUSPLUS_API
908
+
909
+ U_NAMESPACE_BEGIN
910
+
911
+ /**
912
+ * \class LocalUDateFormatPointer
913
+ * "Smart pointer" class, closes a UDateFormat via udat_close().
914
+ * For most methods see the LocalPointerBase base class.
915
+ *
916
+ * @see LocalPointerBase
917
+ * @see LocalPointer
918
+ * @stable ICU 4.4
919
+ */
920
+ U_DEFINE_LOCAL_OPEN_POINTER(LocalUDateFormatPointer, UDateFormat, udat_close);
921
+
922
+ U_NAMESPACE_END
923
+
924
+ #endif
925
+
926
+ /**
927
+ * Open a copy of a UDateFormat.
928
+ * This function performs a deep copy.
929
+ * @param fmt The format to copy
930
+ * @param status A pointer to an UErrorCode to receive any errors.
931
+ * @return A pointer to a UDateFormat identical to fmt.
932
+ * @stable ICU 2.0
933
+ */
934
+ U_STABLE UDateFormat* U_EXPORT2
935
+ udat_clone(const UDateFormat *fmt,
936
+ UErrorCode *status);
937
+
938
+ /**
939
+ * Format a date using an UDateFormat.
940
+ * The date will be formatted using the conventions specified in {@link #udat_open }
941
+ * @param format The formatter to use
942
+ * @param dateToFormat The date to format
943
+ * @param result A pointer to a buffer to receive the formatted number.
944
+ * @param resultLength The maximum size of result.
945
+ * @param position A pointer to a UFieldPosition. On input, position->field
946
+ * is read. On output, position->beginIndex and position->endIndex indicate
947
+ * the beginning and ending indices of field number position->field, if such
948
+ * a field exists. This parameter may be NULL, in which case no field
949
+ * position data is returned.
950
+ * @param status A pointer to an UErrorCode to receive any errors
951
+ * @return The total buffer size needed; if greater than resultLength, the output was truncated.
952
+ * @see udat_parse
953
+ * @see UFieldPosition
954
+ * @stable ICU 2.0
955
+ */
956
+ U_STABLE int32_t U_EXPORT2
957
+ udat_format( const UDateFormat* format,
958
+ UDate dateToFormat,
959
+ UChar* result,
960
+ int32_t resultLength,
961
+ UFieldPosition* position,
962
+ UErrorCode* status);
963
+
964
+ /**
965
+ * Parse a string into an date/time using a UDateFormat.
966
+ * The date will be parsed using the conventions specified in {@link #udat_open }.
967
+ * <P>
968
+ * Note that the normal date formats associated with some calendars - such
969
+ * as the Chinese lunar calendar - do not specify enough fields to enable
970
+ * dates to be parsed unambiguously. In the case of the Chinese lunar
971
+ * calendar, while the year within the current 60-year cycle is specified,
972
+ * the number of such cycles since the start date of the calendar (in the
973
+ * UCAL_ERA field of the UCalendar object) is not normally part of the format,
974
+ * and parsing may assume the wrong era. For cases such as this it is
975
+ * recommended that clients parse using udat_parseCalendar with the UCalendar
976
+ * passed in set to the current date, or to a date within the era/cycle that
977
+ * should be assumed if absent in the format.
978
+ *
979
+ * @param format The formatter to use.
980
+ * @param text The text to parse.
981
+ * @param textLength The length of text, or -1 if null-terminated.
982
+ * @param parsePos If not 0, on input a pointer to an integer specifying the offset at which
983
+ * to begin parsing. If not 0, on output the offset at which parsing ended.
984
+ * @param status A pointer to an UErrorCode to receive any errors
985
+ * @return The value of the parsed date/time
986
+ * @see udat_format
987
+ * @stable ICU 2.0
988
+ */
989
+ U_STABLE UDate U_EXPORT2
990
+ udat_parse(const UDateFormat* format,
991
+ const UChar* text,
992
+ int32_t textLength,
993
+ int32_t *parsePos,
994
+ UErrorCode *status);
995
+
996
+ /**
997
+ * Parse a string into an date/time using a UDateFormat.
998
+ * The date will be parsed using the conventions specified in {@link #udat_open }.
999
+ * @param format The formatter to use.
1000
+ * @param calendar A calendar set on input to the date and time to be used for
1001
+ * missing values in the date/time string being parsed, and set
1002
+ * on output to the parsed date/time. When the calendar type is
1003
+ * different from the internal calendar held by the UDateFormat
1004
+ * instance, the internal calendar will be cloned to a work
1005
+ * calendar set to the same milliseconds and time zone as this
1006
+ * calendar parameter, field values will be parsed based on the
1007
+ * work calendar, then the result (milliseconds and time zone)
1008
+ * will be set in this calendar.
1009
+ * @param text The text to parse.
1010
+ * @param textLength The length of text, or -1 if null-terminated.
1011
+ * @param parsePos If not 0, on input a pointer to an integer specifying the offset at which
1012
+ * to begin parsing. If not 0, on output the offset at which parsing ended.
1013
+ * @param status A pointer to an UErrorCode to receive any errors
1014
+ * @see udat_format
1015
+ * @stable ICU 2.0
1016
+ */
1017
+ U_STABLE void U_EXPORT2
1018
+ udat_parseCalendar(const UDateFormat* format,
1019
+ UCalendar* calendar,
1020
+ const UChar* text,
1021
+ int32_t textLength,
1022
+ int32_t *parsePos,
1023
+ UErrorCode *status);
1024
+
1025
+ /**
1026
+ * Determine if an UDateFormat will perform lenient parsing.
1027
+ * With lenient parsing, the parser may use heuristics to interpret inputs that do not
1028
+ * precisely match the pattern. With strict parsing, inputs must match the pattern.
1029
+ * @param fmt The formatter to query
1030
+ * @return TRUE if fmt is set to perform lenient parsing, FALSE otherwise.
1031
+ * @see udat_setLenient
1032
+ * @stable ICU 2.0
1033
+ */
1034
+ U_STABLE UBool U_EXPORT2
1035
+ udat_isLenient(const UDateFormat* fmt);
1036
+
1037
+ /**
1038
+ * Specify whether an UDateFormat will perform lenient parsing.
1039
+ * With lenient parsing, the parser may use heuristics to interpret inputs that do not
1040
+ * precisely match the pattern. With strict parsing, inputs must match the pattern.
1041
+ * @param fmt The formatter to set
1042
+ * @param isLenient TRUE if fmt should perform lenient parsing, FALSE otherwise.
1043
+ * @see dat_isLenient
1044
+ * @stable ICU 2.0
1045
+ */
1046
+ U_STABLE void U_EXPORT2
1047
+ udat_setLenient( UDateFormat* fmt,
1048
+ UBool isLenient);
1049
+
1050
+ /**
1051
+ * Get the UCalendar associated with an UDateFormat.
1052
+ * A UDateFormat uses a UCalendar to convert a raw value to, for example,
1053
+ * the day of the week.
1054
+ * @param fmt The formatter to query.
1055
+ * @return A pointer to the UCalendar used by fmt.
1056
+ * @see udat_setCalendar
1057
+ * @stable ICU 2.0
1058
+ */
1059
+ U_STABLE const UCalendar* U_EXPORT2
1060
+ udat_getCalendar(const UDateFormat* fmt);
1061
+
1062
+ /**
1063
+ * Set the UCalendar associated with an UDateFormat.
1064
+ * A UDateFormat uses a UCalendar to convert a raw value to, for example,
1065
+ * the day of the week.
1066
+ * @param fmt The formatter to set.
1067
+ * @param calendarToSet A pointer to an UCalendar to be used by fmt.
1068
+ * @see udat_setCalendar
1069
+ * @stable ICU 2.0
1070
+ */
1071
+ U_STABLE void U_EXPORT2
1072
+ udat_setCalendar( UDateFormat* fmt,
1073
+ const UCalendar* calendarToSet);
1074
+
1075
+ /**
1076
+ * Get the UNumberFormat associated with an UDateFormat.
1077
+ * A UDateFormat uses a UNumberFormat to format numbers within a date,
1078
+ * for example the day number.
1079
+ * @param fmt The formatter to query.
1080
+ * @return A pointer to the UNumberFormat used by fmt to format numbers.
1081
+ * @see udat_setNumberFormat
1082
+ * @stable ICU 2.0
1083
+ */
1084
+ U_STABLE const UNumberFormat* U_EXPORT2
1085
+ udat_getNumberFormat(const UDateFormat* fmt);
1086
+
1087
+ #ifndef U_HIDE_DRAFT_API
1088
+ /**
1089
+ * Get the UNumberFormat for specific field associated with an UDateFormat.
1090
+ * For example: 'y' for year and 'M' for month
1091
+ * @param fmt The formatter to query.
1092
+ * @param field the field to query
1093
+ * @return A pointer to the UNumberFormat used by fmt to format field numbers.
1094
+ * @see udat_setNumberFormatForField
1095
+ * @draft ICU 54
1096
+ */
1097
+ U_DRAFT const UNumberFormat* U_EXPORT2
1098
+ udat_getNumberFormatForField(const UDateFormat* fmt, UChar field);
1099
+
1100
+ /**
1101
+ * Set the UNumberFormat for specific field associated with an UDateFormat.
1102
+ * It can be a single field like: "y"(year) or "M"(month)
1103
+ * It can be several field combined together: "yM"(year and month)
1104
+ * Note:
1105
+ * 1 symbol field is enough for multiple symbol field (so "y" will override "yy", "yyy")
1106
+ * If the field is not numeric, then override has no effect (like "MMM" will use abbreviation, not numerical field)
1107
+ *
1108
+ * @param fields the fields to set
1109
+ * @param fmt The formatter to set.
1110
+ * @param numberFormatToSet A pointer to the UNumberFormat to be used by fmt to format numbers.
1111
+ * @param status error code passed around (memory allocation or invalid fields)
1112
+ * @see udat_getNumberFormatForField
1113
+ * @draft ICU 54
1114
+ */
1115
+ U_DRAFT void U_EXPORT2
1116
+ udat_adoptNumberFormatForFields( UDateFormat* fmt,
1117
+ const UChar* fields,
1118
+ UNumberFormat* numberFormatToSet,
1119
+ UErrorCode* status);
1120
+ #endif /* U_HIDE_DRAFT_API */
1121
+
1122
+ /**
1123
+ * Set the UNumberFormat associated with an UDateFormat.
1124
+ * A UDateFormat uses a UNumberFormat to format numbers within a date,
1125
+ * for example the day number.
1126
+ * This method also clears per field NumberFormat instances previously
1127
+ * set by {@see udat_setNumberFormatForField}
1128
+ * @param fmt The formatter to set.
1129
+ * @param numberFormatToSet A pointer to the UNumberFormat to be used by fmt to format numbers.
1130
+ * @see udat_getNumberFormat
1131
+ * @see udat_setNumberFormatForField
1132
+ * @stable ICU 2.0
1133
+ */
1134
+ U_STABLE void U_EXPORT2
1135
+ udat_setNumberFormat( UDateFormat* fmt,
1136
+ const UNumberFormat* numberFormatToSet);
1137
+
1138
+ #ifndef U_HIDE_DRAFT_API
1139
+ /**
1140
+ * Adopt the UNumberFormat associated with an UDateFormat.
1141
+ * A UDateFormat uses a UNumberFormat to format numbers within a date,
1142
+ * for example the day number.
1143
+ * @param fmt The formatter to set.
1144
+ * @param numberFormatToAdopt A pointer to the UNumberFormat to be used by fmt to format numbers.
1145
+ * @see udat_getNumberFormat
1146
+ * @draft ICU 54
1147
+ */
1148
+ U_DRAFT void U_EXPORT2
1149
+ udat_adoptNumberFormat( UDateFormat* fmt,
1150
+ UNumberFormat* numberFormatToAdopt);
1151
+ #endif /* U_HIDE_DRAFT_API */
1152
+
1153
+ /**
1154
+ * Get a locale for which date/time formatting patterns are available.
1155
+ * A UDateFormat in a locale returned by this function will perform the correct
1156
+ * formatting and parsing for the locale.
1157
+ * @param localeIndex The index of the desired locale.
1158
+ * @return A locale for which date/time formatting patterns are available, or 0 if none.
1159
+ * @see udat_countAvailable
1160
+ * @stable ICU 2.0
1161
+ */
1162
+ U_STABLE const char* U_EXPORT2
1163
+ udat_getAvailable(int32_t localeIndex);
1164
+
1165
+ /**
1166
+ * Determine how many locales have date/time formatting patterns available.
1167
+ * This function is most useful as determining the loop ending condition for
1168
+ * calls to {@link #udat_getAvailable }.
1169
+ * @return The number of locales for which date/time formatting patterns are available.
1170
+ * @see udat_getAvailable
1171
+ * @stable ICU 2.0
1172
+ */
1173
+ U_STABLE int32_t U_EXPORT2
1174
+ udat_countAvailable(void);
1175
+
1176
+ /**
1177
+ * Get the year relative to which all 2-digit years are interpreted.
1178
+ * For example, if the 2-digit start year is 2100, the year 99 will be
1179
+ * interpreted as 2199.
1180
+ * @param fmt The formatter to query.
1181
+ * @param status A pointer to an UErrorCode to receive any errors
1182
+ * @return The year relative to which all 2-digit years are interpreted.
1183
+ * @see udat_Set2DigitYearStart
1184
+ * @stable ICU 2.0
1185
+ */
1186
+ U_STABLE UDate U_EXPORT2
1187
+ udat_get2DigitYearStart( const UDateFormat *fmt,
1188
+ UErrorCode *status);
1189
+
1190
+ /**
1191
+ * Set the year relative to which all 2-digit years will be interpreted.
1192
+ * For example, if the 2-digit start year is 2100, the year 99 will be
1193
+ * interpreted as 2199.
1194
+ * @param fmt The formatter to set.
1195
+ * @param d The year relative to which all 2-digit years will be interpreted.
1196
+ * @param status A pointer to an UErrorCode to receive any errors
1197
+ * @see udat_Set2DigitYearStart
1198
+ * @stable ICU 2.0
1199
+ */
1200
+ U_STABLE void U_EXPORT2
1201
+ udat_set2DigitYearStart( UDateFormat *fmt,
1202
+ UDate d,
1203
+ UErrorCode *status);
1204
+
1205
+ /**
1206
+ * Extract the pattern from a UDateFormat.
1207
+ * The pattern will follow the pattern syntax rules.
1208
+ * @param fmt The formatter to query.
1209
+ * @param localized TRUE if the pattern should be localized, FALSE otherwise.
1210
+ * @param result A pointer to a buffer to receive the pattern.
1211
+ * @param resultLength The maximum size of result.
1212
+ * @param status A pointer to an UErrorCode to receive any errors
1213
+ * @return The total buffer size needed; if greater than resultLength, the output was truncated.
1214
+ * @see udat_applyPattern
1215
+ * @stable ICU 2.0
1216
+ */
1217
+ U_STABLE int32_t U_EXPORT2
1218
+ udat_toPattern( const UDateFormat *fmt,
1219
+ UBool localized,
1220
+ UChar *result,
1221
+ int32_t resultLength,
1222
+ UErrorCode *status);
1223
+
1224
+ /**
1225
+ * Set the pattern used by an UDateFormat.
1226
+ * The pattern should follow the pattern syntax rules.
1227
+ * @param format The formatter to set.
1228
+ * @param localized TRUE if the pattern is localized, FALSE otherwise.
1229
+ * @param pattern The new pattern
1230
+ * @param patternLength The length of pattern, or -1 if null-terminated.
1231
+ * @see udat_toPattern
1232
+ * @stable ICU 2.0
1233
+ */
1234
+ U_STABLE void U_EXPORT2
1235
+ udat_applyPattern( UDateFormat *format,
1236
+ UBool localized,
1237
+ const UChar *pattern,
1238
+ int32_t patternLength);
1239
+
1240
+ /**
1241
+ * The possible types of date format symbols
1242
+ * @stable ICU 2.6
1243
+ */
1244
+ typedef enum UDateFormatSymbolType {
1245
+ /** The era names, for example AD */
1246
+ UDAT_ERAS,
1247
+ /** The month names, for example February */
1248
+ UDAT_MONTHS,
1249
+ /** The short month names, for example Feb. */
1250
+ UDAT_SHORT_MONTHS,
1251
+ /** The CLDR-style format "wide" weekday names, for example Monday */
1252
+ UDAT_WEEKDAYS,
1253
+ /**
1254
+ * The CLDR-style format "abbreviated" (not "short") weekday names, for example "Mon."
1255
+ * For the CLDR-style format "short" weekday names, use UDAT_SHORTER_WEEKDAYS.
1256
+ */
1257
+ UDAT_SHORT_WEEKDAYS,
1258
+ /** The AM/PM names, for example AM */
1259
+ UDAT_AM_PMS,
1260
+ /** The localized characters */
1261
+ UDAT_LOCALIZED_CHARS,
1262
+ /** The long era names, for example Anno Domini */
1263
+ UDAT_ERA_NAMES,
1264
+ /** The narrow month names, for example F */
1265
+ UDAT_NARROW_MONTHS,
1266
+ /** The CLDR-style format "narrow" weekday names, for example "M" */
1267
+ UDAT_NARROW_WEEKDAYS,
1268
+ /** Standalone context versions of months */
1269
+ UDAT_STANDALONE_MONTHS,
1270
+ UDAT_STANDALONE_SHORT_MONTHS,
1271
+ UDAT_STANDALONE_NARROW_MONTHS,
1272
+ /** The CLDR-style stand-alone "wide" weekday names */
1273
+ UDAT_STANDALONE_WEEKDAYS,
1274
+ /**
1275
+ * The CLDR-style stand-alone "abbreviated" (not "short") weekday names.
1276
+ * For the CLDR-style stand-alone "short" weekday names, use UDAT_STANDALONE_SHORTER_WEEKDAYS.
1277
+ */
1278
+ UDAT_STANDALONE_SHORT_WEEKDAYS,
1279
+ /** The CLDR-style stand-alone "narrow" weekday names */
1280
+ UDAT_STANDALONE_NARROW_WEEKDAYS,
1281
+ /** The quarters, for example 1st Quarter */
1282
+ UDAT_QUARTERS,
1283
+ /** The short quarter names, for example Q1 */
1284
+ UDAT_SHORT_QUARTERS,
1285
+ /** Standalone context versions of quarters */
1286
+ UDAT_STANDALONE_QUARTERS,
1287
+ UDAT_STANDALONE_SHORT_QUARTERS,
1288
+ /**
1289
+ * The CLDR-style short weekday names, e.g. "Su", Mo", etc.
1290
+ * These are named "SHORTER" to contrast with the constants using _SHORT_
1291
+ * above, which actually get the CLDR-style *abbreviated* versions of the
1292
+ * corresponding names.
1293
+ * @stable ICU 51
1294
+ */
1295
+ UDAT_SHORTER_WEEKDAYS,
1296
+ /**
1297
+ * Standalone version of UDAT_SHORTER_WEEKDAYS.
1298
+ * @stable ICU 51
1299
+ */
1300
+ UDAT_STANDALONE_SHORTER_WEEKDAYS
1301
+ #ifndef U_HIDE_DRAFT_API
1302
+ ,
1303
+ /**
1304
+ * Cyclic year names (only supported for some calendars, and only for FORMAT usage;
1305
+ * udat_setSymbols not supported for UDAT_CYCLIC_YEARS_WIDE)
1306
+ * @draft ICU 54
1307
+ */
1308
+ UDAT_CYCLIC_YEARS_WIDE,
1309
+ /**
1310
+ * Cyclic year names (only supported for some calendars, and only for FORMAT usage)
1311
+ * @draft ICU 54
1312
+ */
1313
+ UDAT_CYCLIC_YEARS_ABBREVIATED,
1314
+ /**
1315
+ * Cyclic year names (only supported for some calendars, and only for FORMAT usage;
1316
+ * udat_setSymbols not supported for UDAT_CYCLIC_YEARS_NARROW)
1317
+ * @draft ICU 54
1318
+ */
1319
+ UDAT_CYCLIC_YEARS_NARROW,
1320
+ /**
1321
+ * Calendar zodiac names (only supported for some calendars, and only for FORMAT usage;
1322
+ * udat_setSymbols not supported for UDAT_ZODIAC_NAMES_WIDE)
1323
+ * @draft ICU 54
1324
+ */
1325
+ UDAT_ZODIAC_NAMES_WIDE,
1326
+ /**
1327
+ * Calendar zodiac names (only supported for some calendars, and only for FORMAT usage)
1328
+ * @draft ICU 54
1329
+ */
1330
+ UDAT_ZODIAC_NAMES_ABBREVIATED,
1331
+ /**
1332
+ * Calendar zodiac names (only supported for some calendars, and only for FORMAT usage;
1333
+ * udat_setSymbols not supported for UDAT_ZODIAC_NAMES_NARROW)
1334
+ * @draft ICU 54
1335
+ */
1336
+ UDAT_ZODIAC_NAMES_NARROW
1337
+ #endif /* U_HIDE_DRAFT_API */
1338
+ } UDateFormatSymbolType;
1339
+
1340
+ struct UDateFormatSymbols;
1341
+ /** Date format symbols.
1342
+ * For usage in C programs.
1343
+ * @stable ICU 2.6
1344
+ */
1345
+ typedef struct UDateFormatSymbols UDateFormatSymbols;
1346
+
1347
+ /**
1348
+ * Get the symbols associated with an UDateFormat.
1349
+ * The symbols are what a UDateFormat uses to represent locale-specific data,
1350
+ * for example month or day names.
1351
+ * @param fmt The formatter to query.
1352
+ * @param type The type of symbols to get. One of UDAT_ERAS, UDAT_MONTHS, UDAT_SHORT_MONTHS,
1353
+ * UDAT_WEEKDAYS, UDAT_SHORT_WEEKDAYS, UDAT_AM_PMS, or UDAT_LOCALIZED_CHARS
1354
+ * @param symbolIndex The desired symbol of type type.
1355
+ * @param result A pointer to a buffer to receive the pattern.
1356
+ * @param resultLength The maximum size of result.
1357
+ * @param status A pointer to an UErrorCode to receive any errors
1358
+ * @return The total buffer size needed; if greater than resultLength, the output was truncated.
1359
+ * @see udat_countSymbols
1360
+ * @see udat_setSymbols
1361
+ * @stable ICU 2.0
1362
+ */
1363
+ U_STABLE int32_t U_EXPORT2
1364
+ udat_getSymbols(const UDateFormat *fmt,
1365
+ UDateFormatSymbolType type,
1366
+ int32_t symbolIndex,
1367
+ UChar *result,
1368
+ int32_t resultLength,
1369
+ UErrorCode *status);
1370
+
1371
+ /**
1372
+ * Count the number of particular symbols for an UDateFormat.
1373
+ * This function is most useful as for detemining the loop termination condition
1374
+ * for calls to {@link #udat_getSymbols }.
1375
+ * @param fmt The formatter to query.
1376
+ * @param type The type of symbols to count. One of UDAT_ERAS, UDAT_MONTHS, UDAT_SHORT_MONTHS,
1377
+ * UDAT_WEEKDAYS, UDAT_SHORT_WEEKDAYS, UDAT_AM_PMS, or UDAT_LOCALIZED_CHARS
1378
+ * @return The number of symbols of type type.
1379
+ * @see udat_getSymbols
1380
+ * @see udat_setSymbols
1381
+ * @stable ICU 2.0
1382
+ */
1383
+ U_STABLE int32_t U_EXPORT2
1384
+ udat_countSymbols( const UDateFormat *fmt,
1385
+ UDateFormatSymbolType type);
1386
+
1387
+ /**
1388
+ * Set the symbols associated with an UDateFormat.
1389
+ * The symbols are what a UDateFormat uses to represent locale-specific data,
1390
+ * for example month or day names.
1391
+ * @param format The formatter to set
1392
+ * @param type The type of symbols to set. One of UDAT_ERAS, UDAT_MONTHS, UDAT_SHORT_MONTHS,
1393
+ * UDAT_WEEKDAYS, UDAT_SHORT_WEEKDAYS, UDAT_AM_PMS, or UDAT_LOCALIZED_CHARS
1394
+ * @param symbolIndex The index of the symbol to set of type type.
1395
+ * @param value The new value
1396
+ * @param valueLength The length of value, or -1 if null-terminated
1397
+ * @param status A pointer to an UErrorCode to receive any errors
1398
+ * @see udat_getSymbols
1399
+ * @see udat_countSymbols
1400
+ * @stable ICU 2.0
1401
+ */
1402
+ U_STABLE void U_EXPORT2
1403
+ udat_setSymbols( UDateFormat *format,
1404
+ UDateFormatSymbolType type,
1405
+ int32_t symbolIndex,
1406
+ UChar *value,
1407
+ int32_t valueLength,
1408
+ UErrorCode *status);
1409
+
1410
+ /**
1411
+ * Get the locale for this date format object.
1412
+ * You can choose between valid and actual locale.
1413
+ * @param fmt The formatter to get the locale from
1414
+ * @param type type of the locale we're looking for (valid or actual)
1415
+ * @param status error code for the operation
1416
+ * @return the locale name
1417
+ * @stable ICU 2.8
1418
+ */
1419
+ U_STABLE const char* U_EXPORT2
1420
+ udat_getLocaleByType(const UDateFormat *fmt,
1421
+ ULocDataLocaleType type,
1422
+ UErrorCode* status);
1423
+
1424
+ /**
1425
+ * Set a particular UDisplayContext value in the formatter, such as
1426
+ * UDISPCTX_CAPITALIZATION_FOR_STANDALONE.
1427
+ * @param fmt The formatter for which to set a UDisplayContext value.
1428
+ * @param value The UDisplayContext value to set.
1429
+ * @param status A pointer to an UErrorCode to receive any errors
1430
+ * @stable ICU 51
1431
+ */
1432
+ U_DRAFT void U_EXPORT2
1433
+ udat_setContext(UDateFormat* fmt, UDisplayContext value, UErrorCode* status);
1434
+
1435
+ #ifndef U_HIDE_DRAFT_API
1436
+ /**
1437
+ * Get the formatter's UDisplayContext value for the specified UDisplayContextType,
1438
+ * such as UDISPCTX_TYPE_CAPITALIZATION.
1439
+ * @param fmt The formatter to query.
1440
+ * @param type The UDisplayContextType whose value to return
1441
+ * @param status A pointer to an UErrorCode to receive any errors
1442
+ * @return The UDisplayContextValue for the specified type.
1443
+ * @draft ICU 53
1444
+ */
1445
+ U_DRAFT UDisplayContext U_EXPORT2
1446
+ udat_getContext(const UDateFormat* fmt, UDisplayContextType type, UErrorCode* status);
1447
+
1448
+ #endif /* U_HIDE_DRAFT_API */
1449
+
1450
+ #ifndef U_HIDE_INTERNAL_API
1451
+ /**
1452
+ * Extract the date pattern from a UDateFormat set for relative date formatting.
1453
+ * The pattern will follow the pattern syntax rules.
1454
+ * @param fmt The formatter to query.
1455
+ * @param result A pointer to a buffer to receive the pattern.
1456
+ * @param resultLength The maximum size of result.
1457
+ * @param status A pointer to a UErrorCode to receive any errors
1458
+ * @return The total buffer size needed; if greater than resultLength, the output was truncated.
1459
+ * @see udat_applyPatternRelative
1460
+ * @internal ICU 4.2 technology preview
1461
+ */
1462
+ U_INTERNAL int32_t U_EXPORT2
1463
+ udat_toPatternRelativeDate(const UDateFormat *fmt,
1464
+ UChar *result,
1465
+ int32_t resultLength,
1466
+ UErrorCode *status);
1467
+
1468
+ /**
1469
+ * Extract the time pattern from a UDateFormat set for relative date formatting.
1470
+ * The pattern will follow the pattern syntax rules.
1471
+ * @param fmt The formatter to query.
1472
+ * @param result A pointer to a buffer to receive the pattern.
1473
+ * @param resultLength The maximum size of result.
1474
+ * @param status A pointer to a UErrorCode to receive any errors
1475
+ * @return The total buffer size needed; if greater than resultLength, the output was truncated.
1476
+ * @see udat_applyPatternRelative
1477
+ * @internal ICU 4.2 technology preview
1478
+ */
1479
+ U_INTERNAL int32_t U_EXPORT2
1480
+ udat_toPatternRelativeTime(const UDateFormat *fmt,
1481
+ UChar *result,
1482
+ int32_t resultLength,
1483
+ UErrorCode *status);
1484
+
1485
+ /**
1486
+ * Set the date & time patterns used by a UDateFormat set for relative date formatting.
1487
+ * The patterns should follow the pattern syntax rules.
1488
+ * @param format The formatter to set.
1489
+ * @param datePattern The new date pattern
1490
+ * @param datePatternLength The length of datePattern, or -1 if null-terminated.
1491
+ * @param timePattern The new time pattern
1492
+ * @param timePatternLength The length of timePattern, or -1 if null-terminated.
1493
+ * @param status A pointer to a UErrorCode to receive any errors
1494
+ * @see udat_toPatternRelativeDate, udat_toPatternRelativeTime
1495
+ * @internal ICU 4.2 technology preview
1496
+ */
1497
+ U_INTERNAL void U_EXPORT2
1498
+ udat_applyPatternRelative(UDateFormat *format,
1499
+ const UChar *datePattern,
1500
+ int32_t datePatternLength,
1501
+ const UChar *timePattern,
1502
+ int32_t timePatternLength,
1503
+ UErrorCode *status);
1504
+
1505
+ /**
1506
+ * @internal
1507
+ * @see udat_open
1508
+ */
1509
+ typedef UDateFormat* (U_EXPORT2 *UDateFormatOpener) (UDateFormatStyle timeStyle,
1510
+ UDateFormatStyle dateStyle,
1511
+ const char *locale,
1512
+ const UChar *tzID,
1513
+ int32_t tzIDLength,
1514
+ const UChar *pattern,
1515
+ int32_t patternLength,
1516
+ UErrorCode *status);
1517
+
1518
+ /**
1519
+ * Register a provider factory
1520
+ * @internal ICU 49
1521
+ */
1522
+ U_INTERNAL void U_EXPORT2
1523
+ udat_registerOpener(UDateFormatOpener opener, UErrorCode *status);
1524
+
1525
+ /**
1526
+ * Un-Register a provider factory
1527
+ * @internal ICU 49
1528
+ */
1529
+ U_INTERNAL UDateFormatOpener U_EXPORT2
1530
+ udat_unregisterOpener(UDateFormatOpener opener, UErrorCode *status);
1531
+ #endif /* U_HIDE_INTERNAL_API */
1532
+
1533
+
1534
+ #endif /* #if !UCONFIG_NO_FORMATTING */
1535
+
1536
+ #endif