pango 2.2.0-x86-mingw32 → 2.2.1-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +21 -2
- data/lib/2.0/pango.so +0 -0
- data/vendor/local/bin/derb.exe +0 -0
- data/vendor/local/bin/genbrk.exe +0 -0
- data/vendor/local/bin/genccode.exe +0 -0
- data/vendor/local/bin/gencfu.exe +0 -0
- data/vendor/local/bin/gencmn.exe +0 -0
- data/vendor/local/bin/gencnval.exe +0 -0
- data/vendor/local/bin/gendict.exe +0 -0
- data/vendor/local/bin/gennorm2.exe +0 -0
- data/vendor/local/bin/genrb.exe +0 -0
- data/vendor/local/bin/gensprep.exe +0 -0
- data/vendor/local/bin/hb-ot-shape-closure.exe +0 -0
- data/vendor/local/bin/hb-shape.exe +0 -0
- data/vendor/local/bin/hb-view.exe +0 -0
- data/vendor/local/bin/icu-config +820 -0
- data/vendor/local/bin/icuinfo.exe +0 -0
- data/vendor/local/bin/icupkg.exe +0 -0
- data/vendor/local/bin/libharfbuzz-0.dll +0 -0
- data/vendor/local/bin/libpango-1.0-0.dll +0 -0
- data/vendor/local/bin/libpangocairo-1.0-0.dll +0 -0
- data/vendor/local/bin/libpangoft2-1.0-0.dll +0 -0
- data/vendor/local/bin/libpangowin32-1.0-0.dll +0 -0
- data/vendor/local/bin/libstdc++-6.dll +0 -0
- data/vendor/local/bin/makeconv.exe +0 -0
- data/vendor/local/bin/pango-querymodules.exe +0 -0
- data/vendor/local/bin/pango-view.exe +0 -0
- data/vendor/local/bin/pkgdata.exe +0 -0
- data/vendor/local/bin/uconv.exe +0 -0
- data/vendor/local/etc/pango/pango.modules +3 -3
- data/vendor/local/include/harfbuzz/hb-blob.h +3 -4
- data/vendor/local/include/harfbuzz/hb-buffer.h +22 -1
- data/vendor/local/include/harfbuzz/hb-common.h +23 -18
- data/vendor/local/include/harfbuzz/hb-icu.h +52 -0
- data/vendor/local/include/harfbuzz/hb-ot-font.h +41 -0
- data/vendor/local/include/harfbuzz/hb-ot-layout.h +11 -3
- data/vendor/local/include/harfbuzz/hb-ot-shape.h +10 -11
- data/vendor/local/include/harfbuzz/hb-ot.h +1 -0
- data/vendor/local/include/harfbuzz/hb-version.h +7 -7
- data/vendor/local/include/layout/LEFontInstance.h +550 -0
- data/vendor/local/include/layout/LEGlyphFilter.h +45 -0
- data/vendor/local/include/layout/LEGlyphStorage.h +546 -0
- data/vendor/local/include/layout/LEInsertionList.h +177 -0
- data/vendor/local/include/layout/LELanguages.h +112 -0
- data/vendor/local/include/layout/LEScripts.h +263 -0
- data/vendor/local/include/layout/LESwaps.h +100 -0
- data/vendor/local/include/layout/LETableReference.h +418 -0
- data/vendor/local/include/layout/LETypes.h +728 -0
- data/vendor/local/include/layout/LayoutEngine.h +518 -0
- data/vendor/local/include/layout/ParagraphLayout.h +747 -0
- data/vendor/local/include/layout/RunArrays.h +676 -0
- data/vendor/local/include/layout/loengine.h +225 -0
- data/vendor/local/include/layout/playout.h +466 -0
- data/vendor/local/include/layout/plruns.h +441 -0
- data/vendor/local/include/pango-1.0/pango/pango-features.h +2 -2
- data/vendor/local/include/pango-1.0/pango/pango-font.h +3 -1
- data/vendor/local/include/pango-1.0/pango/pango-item.h +11 -2
- data/vendor/local/include/unicode/alphaindex.h +752 -0
- data/vendor/local/include/unicode/appendable.h +232 -0
- data/vendor/local/include/unicode/basictz.h +214 -0
- data/vendor/local/include/unicode/brkiter.h +655 -0
- data/vendor/local/include/unicode/bytestream.h +257 -0
- data/vendor/local/include/unicode/bytestrie.h +519 -0
- data/vendor/local/include/unicode/bytestriebuilder.h +181 -0
- data/vendor/local/include/unicode/calendar.h +2519 -0
- data/vendor/local/include/unicode/caniter.h +208 -0
- data/vendor/local/include/unicode/chariter.h +722 -0
- data/vendor/local/include/unicode/choicfmt.h +594 -0
- data/vendor/local/include/unicode/coleitr.h +404 -0
- data/vendor/local/include/unicode/coll.h +1267 -0
- data/vendor/local/include/unicode/compactdecimalformat.h +330 -0
- data/vendor/local/include/unicode/curramt.h +130 -0
- data/vendor/local/include/unicode/currpinf.h +258 -0
- data/vendor/local/include/unicode/currunit.h +110 -0
- data/vendor/local/include/unicode/datefmt.h +883 -0
- data/vendor/local/include/unicode/dbbi.h +40 -0
- data/vendor/local/include/unicode/dcfmtsym.h +482 -0
- data/vendor/local/include/unicode/decimfmt.h +2479 -0
- data/vendor/local/include/unicode/docmain.h +215 -0
- data/vendor/local/include/unicode/dtfmtsym.h +912 -0
- data/vendor/local/include/unicode/dtintrv.h +158 -0
- data/vendor/local/include/unicode/dtitvfmt.h +985 -0
- data/vendor/local/include/unicode/dtitvinf.h +514 -0
- data/vendor/local/include/unicode/dtptngen.h +498 -0
- data/vendor/local/include/unicode/dtrule.h +250 -0
- data/vendor/local/include/unicode/enumset.h +64 -0
- data/vendor/local/include/unicode/errorcode.h +137 -0
- data/vendor/local/include/unicode/fieldpos.h +291 -0
- data/vendor/local/include/unicode/filteredbrk.h +131 -0
- data/vendor/local/include/unicode/fmtable.h +760 -0
- data/vendor/local/include/unicode/format.h +305 -0
- data/vendor/local/include/unicode/fpositer.h +117 -0
- data/vendor/local/include/unicode/gender.h +111 -0
- data/vendor/local/include/unicode/gregocal.h +777 -0
- data/vendor/local/include/unicode/icudataver.h +41 -0
- data/vendor/local/include/unicode/icuplug.h +371 -0
- data/vendor/local/include/unicode/idna.h +323 -0
- data/vendor/local/include/unicode/listformatter.h +167 -0
- data/vendor/local/include/unicode/localpointer.h +304 -0
- data/vendor/local/include/unicode/locdspnm.h +204 -0
- data/vendor/local/include/unicode/locid.h +815 -0
- data/vendor/local/include/unicode/measfmt.h +389 -0
- data/vendor/local/include/unicode/measunit.h +1443 -0
- data/vendor/local/include/unicode/measure.h +159 -0
- data/vendor/local/include/unicode/messagepattern.h +943 -0
- data/vendor/local/include/unicode/msgfmt.h +1093 -0
- data/vendor/local/include/unicode/normalizer2.h +658 -0
- data/vendor/local/include/unicode/normlzr.h +797 -0
- data/vendor/local/include/unicode/numfmt.h +1187 -0
- data/vendor/local/include/unicode/numsys.h +208 -0
- data/vendor/local/include/unicode/parseerr.h +92 -0
- data/vendor/local/include/unicode/parsepos.h +230 -0
- data/vendor/local/include/unicode/platform.h +751 -0
- data/vendor/local/include/unicode/plurfmt.h +615 -0
- data/vendor/local/include/unicode/plurrule.h +501 -0
- data/vendor/local/include/unicode/ptypes.h +126 -0
- data/vendor/local/include/unicode/putil.h +181 -0
- data/vendor/local/include/unicode/rbbi.h +782 -0
- data/vendor/local/include/unicode/rbnf.h +1032 -0
- data/vendor/local/include/unicode/rbtz.h +362 -0
- data/vendor/local/include/unicode/regex.h +1857 -0
- data/vendor/local/include/unicode/region.h +228 -0
- data/vendor/local/include/unicode/reldatefmt.h +498 -0
- data/vendor/local/include/unicode/rep.h +261 -0
- data/vendor/local/include/unicode/resbund.h +490 -0
- data/vendor/local/include/unicode/schriter.h +187 -0
- data/vendor/local/include/unicode/scientificformathelper.h +139 -0
- data/vendor/local/include/unicode/search.h +575 -0
- data/vendor/local/include/unicode/selfmt.h +367 -0
- data/vendor/local/include/unicode/simpletz.h +928 -0
- data/vendor/local/include/unicode/smpdtfmt.h +1592 -0
- data/vendor/local/include/unicode/sortkey.h +338 -0
- data/vendor/local/include/unicode/std_string.h +37 -0
- data/vendor/local/include/unicode/strenum.h +276 -0
- data/vendor/local/include/unicode/stringpiece.h +224 -0
- data/vendor/local/include/unicode/stringtriebuilder.h +402 -0
- data/vendor/local/include/unicode/stsearch.h +504 -0
- data/vendor/local/include/unicode/symtable.h +112 -0
- data/vendor/local/include/unicode/tblcoll.h +873 -0
- data/vendor/local/include/unicode/timezone.h +948 -0
- data/vendor/local/include/unicode/tmunit.h +129 -0
- data/vendor/local/include/unicode/tmutamt.h +168 -0
- data/vendor/local/include/unicode/tmutfmt.h +243 -0
- data/vendor/local/include/unicode/translit.h +1342 -0
- data/vendor/local/include/unicode/tzfmt.h +1098 -0
- data/vendor/local/include/unicode/tznames.h +404 -0
- data/vendor/local/include/unicode/tzrule.h +828 -0
- data/vendor/local/include/unicode/tztrans.h +195 -0
- data/vendor/local/include/unicode/ubidi.h +2186 -0
- data/vendor/local/include/unicode/ubrk.h +540 -0
- data/vendor/local/include/unicode/ucal.h +1560 -0
- data/vendor/local/include/unicode/ucasemap.h +423 -0
- data/vendor/local/include/unicode/ucat.h +158 -0
- data/vendor/local/include/unicode/uchar.h +3426 -0
- data/vendor/local/include/unicode/ucharstrie.h +576 -0
- data/vendor/local/include/unicode/ucharstriebuilder.h +185 -0
- data/vendor/local/include/unicode/uchriter.h +381 -0
- data/vendor/local/include/unicode/uclean.h +258 -0
- data/vendor/local/include/unicode/ucnv.h +2036 -0
- data/vendor/local/include/unicode/ucnv_cb.h +162 -0
- data/vendor/local/include/unicode/ucnv_err.h +463 -0
- data/vendor/local/include/unicode/ucnvsel.h +187 -0
- data/vendor/local/include/unicode/ucol.h +1474 -0
- data/vendor/local/include/unicode/ucoleitr.h +266 -0
- data/vendor/local/include/unicode/uconfig.h +430 -0
- data/vendor/local/include/unicode/ucsdet.h +413 -0
- data/vendor/local/include/unicode/ucurr.h +424 -0
- data/vendor/local/include/unicode/udat.h +1536 -0
- data/vendor/local/include/unicode/udata.h +430 -0
- data/vendor/local/include/unicode/udateintervalformat.h +181 -0
- data/vendor/local/include/unicode/udatpg.h +588 -0
- data/vendor/local/include/unicode/udisplaycontext.h +150 -0
- data/vendor/local/include/unicode/uenum.h +206 -0
- data/vendor/local/include/unicode/uformattable.h +280 -0
- data/vendor/local/include/unicode/ugender.h +82 -0
- data/vendor/local/include/unicode/uidna.h +762 -0
- data/vendor/local/include/unicode/uiter.h +707 -0
- data/vendor/local/include/unicode/uldnames.h +302 -0
- data/vendor/local/include/unicode/uloc.h +1256 -0
- data/vendor/local/include/unicode/ulocdata.h +277 -0
- data/vendor/local/include/unicode/umachine.h +356 -0
- data/vendor/local/include/unicode/umisc.h +60 -0
- data/vendor/local/include/unicode/umsg.h +623 -0
- data/vendor/local/include/unicode/unifilt.h +120 -0
- data/vendor/local/include/unicode/unifunct.h +125 -0
- data/vendor/local/include/unicode/unimatch.h +163 -0
- data/vendor/local/include/unicode/unirepl.h +97 -0
- data/vendor/local/include/unicode/uniset.h +1691 -0
- data/vendor/local/include/unicode/unistr.h +4470 -0
- data/vendor/local/include/unicode/unorm.h +561 -0
- data/vendor/local/include/unicode/unorm2.h +528 -0
- data/vendor/local/include/unicode/unum.h +1328 -0
- data/vendor/local/include/unicode/unumsys.h +170 -0
- data/vendor/local/include/unicode/uobject.h +320 -0
- data/vendor/local/include/unicode/upluralrules.h +145 -0
- data/vendor/local/include/unicode/uregex.h +1591 -0
- data/vendor/local/include/unicode/uregion.h +248 -0
- data/vendor/local/include/unicode/urename.h +1784 -0
- data/vendor/local/include/unicode/urep.h +155 -0
- data/vendor/local/include/unicode/ures.h +887 -0
- data/vendor/local/include/unicode/uscript.h +642 -0
- data/vendor/local/include/unicode/usearch.h +885 -0
- data/vendor/local/include/unicode/uset.h +1126 -0
- data/vendor/local/include/unicode/usetiter.h +318 -0
- data/vendor/local/include/unicode/ushape.h +474 -0
- data/vendor/local/include/unicode/uspoof.h +1064 -0
- data/vendor/local/include/unicode/usprep.h +269 -0
- data/vendor/local/include/unicode/ustdio.h +1018 -0
- data/vendor/local/include/unicode/ustream.h +68 -0
- data/vendor/local/include/unicode/ustring.h +1700 -0
- data/vendor/local/include/unicode/ustringtrie.h +95 -0
- data/vendor/local/include/unicode/utext.h +1600 -0
- data/vendor/local/include/unicode/utf.h +223 -0
- data/vendor/local/include/unicode/utf16.h +623 -0
- data/vendor/local/include/unicode/utf32.h +23 -0
- data/vendor/local/include/unicode/utf8.h +824 -0
- data/vendor/local/include/unicode/utf_old.h +1169 -0
- data/vendor/local/include/unicode/utmscale.h +481 -0
- data/vendor/local/include/unicode/utrace.h +359 -0
- data/vendor/local/include/unicode/utrans.h +658 -0
- data/vendor/local/include/unicode/utypes.h +723 -0
- data/vendor/local/include/unicode/uvernum.h +170 -0
- data/vendor/local/include/unicode/uversion.h +193 -0
- data/vendor/local/include/unicode/vtzone.h +455 -0
- data/vendor/local/lib/girepository-1.0/Pango-1.0.typelib +0 -0
- data/vendor/local/lib/girepository-1.0/PangoCairo-1.0.typelib +0 -0
- data/vendor/local/lib/girepository-1.0/PangoFT2-1.0.typelib +0 -0
- data/vendor/local/lib/icu/54.1/Makefile.inc +293 -0
- data/vendor/local/lib/icu/54.1/pkgdata.inc +17 -0
- data/vendor/local/lib/icu/Makefile.inc +293 -0
- data/vendor/local/lib/icu/pkgdata.inc +17 -0
- data/vendor/local/lib/icudt.dll +0 -0
- data/vendor/local/lib/icudt54.dll +0 -0
- data/vendor/local/lib/icuin.dll +0 -0
- data/vendor/local/lib/icuin54.dll +0 -0
- data/vendor/local/lib/icuio.dll +0 -0
- data/vendor/local/lib/icuio54.dll +0 -0
- data/vendor/local/lib/icule.dll +0 -0
- data/vendor/local/lib/icule54.dll +0 -0
- data/vendor/local/lib/iculx.dll +0 -0
- data/vendor/local/lib/iculx54.dll +0 -0
- data/vendor/local/lib/icutest.dll +0 -0
- data/vendor/local/lib/icutest54.dll +0 -0
- data/vendor/local/lib/icutu.dll +0 -0
- data/vendor/local/lib/icutu54.dll +0 -0
- data/vendor/local/lib/icuuc.dll +0 -0
- data/vendor/local/lib/icuuc54.dll +0 -0
- data/vendor/local/lib/libharfbuzz-icu.a +0 -0
- data/vendor/local/lib/libharfbuzz-icu.la +41 -0
- data/vendor/local/lib/libharfbuzz.dll.a +0 -0
- data/vendor/local/lib/libharfbuzz.la +3 -3
- data/vendor/local/lib/libicudt.dll.a +0 -0
- data/vendor/local/lib/libicuin.dll.a +0 -0
- data/vendor/local/lib/libicuio.dll.a +0 -0
- data/vendor/local/lib/libicule.dll.a +0 -0
- data/vendor/local/lib/libiculx.dll.a +0 -0
- data/vendor/local/lib/libicutest.dll.a +0 -0
- data/vendor/local/lib/libicutu.dll.a +0 -0
- data/vendor/local/lib/libicuuc.dll.a +0 -0
- data/vendor/local/lib/libpango-1.0.dll.a +0 -0
- data/vendor/local/lib/libpango-1.0.la +2 -2
- data/vendor/local/lib/libpangocairo-1.0.dll.a +0 -0
- data/vendor/local/lib/libpangocairo-1.0.la +2 -2
- data/vendor/local/lib/libpangoft2-1.0.dll.a +0 -0
- data/vendor/local/lib/libpangoft2-1.0.la +2 -2
- data/vendor/local/lib/libpangowin32-1.0.dll.a +0 -0
- data/vendor/local/lib/libpangowin32-1.0.la +2 -2
- data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll.a +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.la +1 -1
- data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll.a +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.la +1 -1
- data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll.a +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.la +1 -1
- data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll.a +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.la +1 -1
- data/vendor/local/lib/pkgconfig/harfbuzz-icu.pc +13 -0
- data/vendor/local/lib/pkgconfig/harfbuzz.pc +1 -1
- data/vendor/local/lib/pkgconfig/icu-i18n.pc +38 -0
- data/vendor/local/lib/pkgconfig/icu-io.pc +38 -0
- data/vendor/local/lib/pkgconfig/icu-le.pc +38 -0
- data/vendor/local/lib/pkgconfig/icu-lx.pc +38 -0
- data/vendor/local/lib/pkgconfig/icu-uc.pc +38 -0
- data/vendor/local/lib/pkgconfig/pango.pc +1 -1
- data/vendor/local/lib/pkgconfig/pangocairo.pc +1 -1
- data/vendor/local/lib/pkgconfig/pangoft2.pc +1 -1
- data/vendor/local/lib/pkgconfig/pangowin32.pc +1 -1
- data/vendor/local/share/gir-1.0/Pango-1.0.gir +3009 -462
- data/vendor/local/share/gir-1.0/PangoCairo-1.0.gir +64 -22
- data/vendor/local/share/gir-1.0/PangoFT2-1.0.gir +4 -2
- data/vendor/local/share/gtk-doc/html/harfbuzz/annotation-glossary.html +30 -26
- data/vendor/local/share/gtk-doc/html/harfbuzz/api-index-full.html +343 -313
- data/vendor/local/share/gtk-doc/html/harfbuzz/ch01.html +5 -5
- data/vendor/local/share/gtk-doc/html/harfbuzz/deprecated-api-index.html +6 -8
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-blob.html +442 -247
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-buffer.html +1389 -654
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-common.html +954 -698
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-coretext.html +95 -18
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-deprecated.html +36 -27
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-face.html +477 -191
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-font.html +1951 -1039
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ft.html +123 -65
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-glib.html +66 -21
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-gobject.html +11 -13
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-graphite2.html +67 -23
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-icu.html +66 -21
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-layout.html +574 -347
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-tag.html +104 -37
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot.html +10 -27
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-set.html +744 -318
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape-plan.html +294 -153
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape.html +196 -104
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-unicode.html +1100 -757
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-uniscribe.html +51 -18
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-version.html +110 -84
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb.html +11 -13
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz.devhelp2 +289 -503
- data/vendor/local/share/gtk-doc/html/harfbuzz/index.html +3 -3
- data/vendor/local/share/gtk-doc/html/harfbuzz/index.sgml +161 -316
- data/vendor/local/share/gtk-doc/html/harfbuzz/object-tree.html +31 -4
- data/vendor/local/share/gtk-doc/html/harfbuzz/style.css +260 -105
- data/vendor/local/share/gtk-doc/html/pango/PangoEngineLang.html +143 -105
- data/vendor/local/share/gtk-doc/html/pango/PangoEngineShape.html +150 -108
- data/vendor/local/share/gtk-doc/html/pango/PangoFcDecoder.html +163 -112
- data/vendor/local/share/gtk-doc/html/pango/PangoFcFont.html +348 -229
- data/vendor/local/share/gtk-doc/html/pango/PangoFcFontMap.html +746 -514
- data/vendor/local/share/gtk-doc/html/pango/PangoMarkupFormat.html +9 -9
- data/vendor/local/share/gtk-doc/html/pango/PangoRenderer.html +853 -623
- data/vendor/local/share/gtk-doc/html/pango/annotation-glossary.html +29 -13
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-10.html +31 -33
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-12.html +10 -12
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-14.html +12 -14
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-16.html +53 -55
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-18.html +28 -30
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-2.html +29 -31
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-20.html +17 -19
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-22.html +28 -30
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-24.html +17 -19
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-26.html +9 -11
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-30.html +6 -6
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-31-0.html +6 -6
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-32-4.html +11 -13
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-32.html +7 -9
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-34.html +5 -5
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-4.html +49 -51
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-6.html +36 -38
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-8.html +37 -39
- data/vendor/local/share/gtk-doc/html/pango/api-index-deprecated.html +68 -70
- data/vendor/local/share/gtk-doc/html/pango/api-index-full.html +568 -570
- data/vendor/local/share/gtk-doc/html/pango/index.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/index.sgml +229 -399
- data/vendor/local/share/gtk-doc/html/pango/lowlevel.html +4 -4
- data/vendor/local/share/gtk-doc/html/pango/pango-Bidirectional-Text.html +345 -259
- data/vendor/local/share/gtk-doc/html/pango/pango-Cairo-Rendering.html +979 -664
- data/vendor/local/share/gtk-doc/html/pango/pango-CoreText-Fonts.html +70 -43
- data/vendor/local/share/gtk-doc/html/pango/pango-Coverage-Maps.html +349 -229
- data/vendor/local/share/gtk-doc/html/pango/pango-Engines.html +236 -153
- data/vendor/local/share/gtk-doc/html/pango/pango-Fonts.html +3100 -2159
- data/vendor/local/share/gtk-doc/html/pango/pango-FreeType-Fonts-and-Rendering.html +659 -472
- data/vendor/local/share/gtk-doc/html/pango/pango-Glyph-Storage.html +1952 -1384
- data/vendor/local/share/gtk-doc/html/pango/pango-Layout-Objects.html +3050 -2135
- data/vendor/local/share/gtk-doc/html/pango/pango-Miscellaneous-Utilities.html +676 -463
- data/vendor/local/share/gtk-doc/html/pango/pango-Modules.html +223 -146
- data/vendor/local/share/gtk-doc/html/pango/pango-OpenType-Font-Handling.html +1589 -1199
- data/vendor/local/share/gtk-doc/html/pango/pango-Scripts-and-Languages.html +1072 -842
- data/vendor/local/share/gtk-doc/html/pango/pango-Tab-Stops.html +406 -276
- data/vendor/local/share/gtk-doc/html/pango/pango-Text-Attributes.html +2541 -1792
- data/vendor/local/share/gtk-doc/html/pango/pango-Text-Processing.html +1479 -1033
- data/vendor/local/share/gtk-doc/html/pango/pango-Version-Checking.html +214 -154
- data/vendor/local/share/gtk-doc/html/pango/pango-Vertical-Text.html +374 -291
- data/vendor/local/share/gtk-doc/html/pango/pango-Win32-Fonts-and-Rendering.html +733 -498
- data/vendor/local/share/gtk-doc/html/pango/pango-Xft-Fonts-and-Rendering.html +893 -617
- data/vendor/local/share/gtk-doc/html/pango/pango-hierarchy.html +59 -59
- data/vendor/local/share/gtk-doc/html/pango/pango-querymodules.html +5 -5
- data/vendor/local/share/gtk-doc/html/pango/pango.devhelp2 +578 -782
- data/vendor/local/share/gtk-doc/html/pango/pango.html +4 -4
- data/vendor/local/share/gtk-doc/html/pango/rendering.html +4 -4
- data/vendor/local/share/gtk-doc/html/pango/style.css +260 -105
- data/vendor/local/share/gtk-doc/html/pango/tools.html +4 -4
- data/vendor/local/share/icu/54.1/config/mh-mingw +158 -0
- data/vendor/local/share/icu/54.1/install-sh +251 -0
- data/vendor/local/share/icu/54.1/license.html +385 -0
- data/vendor/local/share/icu/54.1/mkinstalldirs +43 -0
- data/vendor/local/share/license/harfbuzz/AUTHORS +1 -0
- data/vendor/local/share/man/man1/derb.1 +196 -0
- data/vendor/local/share/man/man1/genbrk.1 +112 -0
- data/vendor/local/share/man/man1/gencfu.1 +91 -0
- data/vendor/local/share/man/man1/gencnval.1 +91 -0
- data/vendor/local/share/man/man1/gendict.1 +131 -0
- data/vendor/local/share/man/man1/genrb.1 +146 -0
- data/vendor/local/share/man/man1/icu-config.1 +288 -0
- data/vendor/local/share/man/man1/makeconv.1 +112 -0
- data/vendor/local/share/man/man1/pango-querymodules.1 +2 -2
- data/vendor/local/share/man/man1/pango-view.1 +1 -118
- data/vendor/local/share/man/man1/pkgdata.1 +258 -0
- data/vendor/local/share/man/man1/uconv.1 +443 -0
- data/vendor/local/share/man/man8/genccode.8 +106 -0
- data/vendor/local/share/man/man8/gencmn.8 +129 -0
- data/vendor/local/share/man/man8/gensprep.8 +102 -0
- data/vendor/local/share/man/man8/icupkg.8 +204 -0
- metadata +266 -14
- data/lib/1.9/pango.so +0 -0
- data/lib/2.1/pango.so +0 -0
@@ -0,0 +1,1592 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (C) 1997-2014, International Business Machines Corporation and
|
3
|
+
* others. All Rights Reserved.
|
4
|
+
*******************************************************************************
|
5
|
+
*
|
6
|
+
* File SMPDTFMT.H
|
7
|
+
*
|
8
|
+
* Modification History:
|
9
|
+
*
|
10
|
+
* Date Name Description
|
11
|
+
* 02/19/97 aliu Converted from java.
|
12
|
+
* 07/09/97 helena Make ParsePosition into a class.
|
13
|
+
* 07/21/98 stephen Added GMT_PLUS, GMT_MINUS
|
14
|
+
* Changed setTwoDigitStartDate to set2DigitYearStart
|
15
|
+
* Changed getTwoDigitStartDate to get2DigitYearStart
|
16
|
+
* Removed subParseLong
|
17
|
+
* Removed getZoneIndex (added in DateFormatSymbols)
|
18
|
+
* 06/14/99 stephen Removed fgTimeZoneDataSuffix
|
19
|
+
* 10/14/99 aliu Updated class doc to describe 2-digit year parsing
|
20
|
+
* {j28 4182066}.
|
21
|
+
*******************************************************************************
|
22
|
+
*/
|
23
|
+
|
24
|
+
#ifndef SMPDTFMT_H
|
25
|
+
#define SMPDTFMT_H
|
26
|
+
|
27
|
+
#include "unicode/utypes.h"
|
28
|
+
|
29
|
+
/**
|
30
|
+
* \file
|
31
|
+
* \brief C++ API: Format and parse dates in a language-independent manner.
|
32
|
+
*/
|
33
|
+
|
34
|
+
#if !UCONFIG_NO_FORMATTING
|
35
|
+
|
36
|
+
#include "unicode/datefmt.h"
|
37
|
+
#include "unicode/udisplaycontext.h"
|
38
|
+
#include "unicode/tzfmt.h" /* for UTimeZoneFormatTimeType */
|
39
|
+
#include "unicode/brkiter.h"
|
40
|
+
|
41
|
+
U_NAMESPACE_BEGIN
|
42
|
+
|
43
|
+
class DateFormatSymbols;
|
44
|
+
class DateFormat;
|
45
|
+
class MessageFormat;
|
46
|
+
class FieldPositionHandler;
|
47
|
+
class TimeZoneFormat;
|
48
|
+
|
49
|
+
/**
|
50
|
+
*
|
51
|
+
* SimpleDateFormat is a concrete class for formatting and parsing dates in a
|
52
|
+
* language-independent manner. It allows for formatting (millis -> text),
|
53
|
+
* parsing (text -> millis), and normalization. Formats/Parses a date or time,
|
54
|
+
* which is the standard milliseconds since 24:00 GMT, Jan 1, 1970.
|
55
|
+
* <P>
|
56
|
+
* Clients are encouraged to create a date-time formatter using DateFormat::getInstance(),
|
57
|
+
* getDateInstance(), getDateInstance(), or getDateTimeInstance() rather than
|
58
|
+
* explicitly constructing an instance of SimpleDateFormat. This way, the client
|
59
|
+
* is guaranteed to get an appropriate formatting pattern for whatever locale the
|
60
|
+
* program is running in. However, if the client needs something more unusual than
|
61
|
+
* the default patterns in the locales, he can construct a SimpleDateFormat directly
|
62
|
+
* and give it an appropriate pattern (or use one of the factory methods on DateFormat
|
63
|
+
* and modify the pattern after the fact with toPattern() and applyPattern().
|
64
|
+
*
|
65
|
+
* <p><strong>Date and Time Patterns:</strong></p>
|
66
|
+
*
|
67
|
+
* <p>Date and time formats are specified by <em>date and time pattern</em> strings.
|
68
|
+
* Within date and time pattern strings, all unquoted ASCII letters [A-Za-z] are reserved
|
69
|
+
* as pattern letters representing calendar fields. <code>SimpleDateFormat</code> supports
|
70
|
+
* the date and time formatting algorithm and pattern letters defined by
|
71
|
+
* <a href="http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table">UTS#35
|
72
|
+
* Unicode Locale Data Markup Language (LDML)</a> and further documented for ICU in the
|
73
|
+
* <a href="https://sites.google.com/site/icuprojectuserguide/formatparse/datetime?pli=1#TOC-Date-Field-Symbol-Table">ICU
|
74
|
+
* User Guide</a>. The following pattern letters are currently available (note that the actual
|
75
|
+
* values depend on CLDR and may change from the examples shown here):</p>
|
76
|
+
*
|
77
|
+
* <table border="1">
|
78
|
+
* <tr>
|
79
|
+
* <th>Field</th>
|
80
|
+
* <th style="text-align: center">Sym.</th>
|
81
|
+
* <th style="text-align: center">No.</th>
|
82
|
+
* <th>Example</th>
|
83
|
+
* <th>Description</th>
|
84
|
+
* </tr>
|
85
|
+
* <tr>
|
86
|
+
* <th rowspan="3">era</th>
|
87
|
+
* <td style="text-align: center" rowspan="3">G</td>
|
88
|
+
* <td style="text-align: center">1..3</td>
|
89
|
+
* <td>AD</td>
|
90
|
+
* <td rowspan="3">Era - Replaced with the Era string for the current date. One to three letters for the
|
91
|
+
* abbreviated form, four letters for the long (wide) form, five for the narrow form.</td>
|
92
|
+
* </tr>
|
93
|
+
* <tr>
|
94
|
+
* <td style="text-align: center">4</td>
|
95
|
+
* <td>Anno Domini</td>
|
96
|
+
* </tr>
|
97
|
+
* <tr>
|
98
|
+
* <td style="text-align: center">5</td>
|
99
|
+
* <td>A</td>
|
100
|
+
* </tr>
|
101
|
+
* <tr>
|
102
|
+
* <th rowspan="6">year</th>
|
103
|
+
* <td style="text-align: center">y</td>
|
104
|
+
* <td style="text-align: center">1..n</td>
|
105
|
+
* <td>1996</td>
|
106
|
+
* <td>Year. Normally the length specifies the padding, but for two letters it also specifies the maximum
|
107
|
+
* length. Example:<div align="center">
|
108
|
+
* <center>
|
109
|
+
* <table border="1" cellpadding="2" cellspacing="0">
|
110
|
+
* <tr>
|
111
|
+
* <th>Year</th>
|
112
|
+
* <th style="text-align: right">y</th>
|
113
|
+
* <th style="text-align: right">yy</th>
|
114
|
+
* <th style="text-align: right">yyy</th>
|
115
|
+
* <th style="text-align: right">yyyy</th>
|
116
|
+
* <th style="text-align: right">yyyyy</th>
|
117
|
+
* </tr>
|
118
|
+
* <tr>
|
119
|
+
* <td>AD 1</td>
|
120
|
+
* <td style="text-align: right">1</td>
|
121
|
+
* <td style="text-align: right">01</td>
|
122
|
+
* <td style="text-align: right">001</td>
|
123
|
+
* <td style="text-align: right">0001</td>
|
124
|
+
* <td style="text-align: right">00001</td>
|
125
|
+
* </tr>
|
126
|
+
* <tr>
|
127
|
+
* <td>AD 12</td>
|
128
|
+
* <td style="text-align: right">12</td>
|
129
|
+
* <td style="text-align: right">12</td>
|
130
|
+
* <td style="text-align: right">012</td>
|
131
|
+
* <td style="text-align: right">0012</td>
|
132
|
+
* <td style="text-align: right">00012</td>
|
133
|
+
* </tr>
|
134
|
+
* <tr>
|
135
|
+
* <td>AD 123</td>
|
136
|
+
* <td style="text-align: right">123</td>
|
137
|
+
* <td style="text-align: right">23</td>
|
138
|
+
* <td style="text-align: right">123</td>
|
139
|
+
* <td style="text-align: right">0123</td>
|
140
|
+
* <td style="text-align: right">00123</td>
|
141
|
+
* </tr>
|
142
|
+
* <tr>
|
143
|
+
* <td>AD 1234</td>
|
144
|
+
* <td style="text-align: right">1234</td>
|
145
|
+
* <td style="text-align: right">34</td>
|
146
|
+
* <td style="text-align: right">1234</td>
|
147
|
+
* <td style="text-align: right">1234</td>
|
148
|
+
* <td style="text-align: right">01234</td>
|
149
|
+
* </tr>
|
150
|
+
* <tr>
|
151
|
+
* <td>AD 12345</td>
|
152
|
+
* <td style="text-align: right">12345</td>
|
153
|
+
* <td style="text-align: right">45</td>
|
154
|
+
* <td style="text-align: right">12345</td>
|
155
|
+
* <td style="text-align: right">12345</td>
|
156
|
+
* <td style="text-align: right">12345</td>
|
157
|
+
* </tr>
|
158
|
+
* </table>
|
159
|
+
* </center></div>
|
160
|
+
* </td>
|
161
|
+
* </tr>
|
162
|
+
* <tr>
|
163
|
+
* <td style="text-align: center">Y</td>
|
164
|
+
* <td style="text-align: center">1..n</td>
|
165
|
+
* <td>1997</td>
|
166
|
+
* <td>Year (in "Week of Year" based calendars). Normally the length specifies the padding,
|
167
|
+
* but for two letters it also specifies the maximum length. This year designation is used in ISO
|
168
|
+
* year-week calendar as defined by ISO 8601, but can be used in non-Gregorian based calendar systems
|
169
|
+
* where week date processing is desired. May not always be the same value as calendar year.</td>
|
170
|
+
* </tr>
|
171
|
+
* <tr>
|
172
|
+
* <td style="text-align: center">u</td>
|
173
|
+
* <td style="text-align: center">1..n</td>
|
174
|
+
* <td>4601</td>
|
175
|
+
* <td>Extended year. This is a single number designating the year of this calendar system, encompassing
|
176
|
+
* all supra-year fields. For example, for the Julian calendar system, year numbers are positive, with an
|
177
|
+
* era of BCE or CE. An extended year value for the Julian calendar system assigns positive values to CE
|
178
|
+
* years and negative values to BCE years, with 1 BCE being year 0.</td>
|
179
|
+
* </tr>
|
180
|
+
* <tr>
|
181
|
+
* <td style="text-align: center" rowspan="3">U</td>
|
182
|
+
* <td style="text-align: center">1..3</td>
|
183
|
+
* <td>甲子</td>
|
184
|
+
* <td rowspan="3">Cyclic year name. Calendars such as the Chinese lunar calendar (and related calendars)
|
185
|
+
* and the Hindu calendars use 60-year cycles of year names. Use one through three letters for the abbreviated
|
186
|
+
* name, four for the full (wide) name, or five for the narrow name (currently the data only provides abbreviated names,
|
187
|
+
* which will be used for all requested name widths). If the calendar does not provide cyclic year name data,
|
188
|
+
* or if the year value to be formatted is out of the range of years for which cyclic name data is provided,
|
189
|
+
* then numeric formatting is used (behaves like 'y').</td>
|
190
|
+
* </tr>
|
191
|
+
* <tr>
|
192
|
+
* <td style="text-align: center">4</td>
|
193
|
+
* <td>(currently also 甲子)</td>
|
194
|
+
* </tr>
|
195
|
+
* <tr>
|
196
|
+
* <td style="text-align: center">5</td>
|
197
|
+
* <td>(currently also 甲子)</td>
|
198
|
+
* </tr>
|
199
|
+
* <tr>
|
200
|
+
* <th rowspan="6">quarter</th>
|
201
|
+
* <td rowspan="3" style="text-align: center">Q</td>
|
202
|
+
* <td style="text-align: center">1..2</td>
|
203
|
+
* <td>02</td>
|
204
|
+
* <td rowspan="3">Quarter - Use one or two for the numerical quarter, three for the abbreviation, or four for the
|
205
|
+
* full (wide) name (five for the narrow name is not yet supported).</td>
|
206
|
+
* </tr>
|
207
|
+
* <tr>
|
208
|
+
* <td style="text-align: center">3</td>
|
209
|
+
* <td>Q2</td>
|
210
|
+
* </tr>
|
211
|
+
* <tr>
|
212
|
+
* <td style="text-align: center">4</td>
|
213
|
+
* <td>2nd quarter</td>
|
214
|
+
* </tr>
|
215
|
+
* <tr>
|
216
|
+
* <td rowspan="3" style="text-align: center">q</td>
|
217
|
+
* <td style="text-align: center">1..2</td>
|
218
|
+
* <td>02</td>
|
219
|
+
* <td rowspan="3"><b>Stand-Alone</b> Quarter - Use one or two for the numerical quarter, three for the abbreviation,
|
220
|
+
* or four for the full name (five for the narrow name is not yet supported).</td>
|
221
|
+
* </tr>
|
222
|
+
* <tr>
|
223
|
+
* <td style="text-align: center">3</td>
|
224
|
+
* <td>Q2</td>
|
225
|
+
* </tr>
|
226
|
+
* <tr>
|
227
|
+
* <td style="text-align: center">4</td>
|
228
|
+
* <td>2nd quarter</td>
|
229
|
+
* </tr>
|
230
|
+
* <tr>
|
231
|
+
* <th rowspan="8">month</th>
|
232
|
+
* <td rowspan="4" style="text-align: center">M</td>
|
233
|
+
* <td style="text-align: center">1..2</td>
|
234
|
+
* <td>09</td>
|
235
|
+
* <td rowspan="4">Month - Use one or two for the numerical month, three for the abbreviation, four for
|
236
|
+
* the full (wide) name, or five for the narrow name. With two ("MM"), the month number is zero-padded
|
237
|
+
* if necessary (e.g. "08")</td>
|
238
|
+
* </tr>
|
239
|
+
* <tr>
|
240
|
+
* <td style="text-align: center">3</td>
|
241
|
+
* <td>Sep</td>
|
242
|
+
* </tr>
|
243
|
+
* <tr>
|
244
|
+
* <td style="text-align: center">4</td>
|
245
|
+
* <td>September</td>
|
246
|
+
* </tr>
|
247
|
+
* <tr>
|
248
|
+
* <td style="text-align: center">5</td>
|
249
|
+
* <td>S</td>
|
250
|
+
* </tr>
|
251
|
+
* <tr>
|
252
|
+
* <td rowspan="4" style="text-align: center">L</td>
|
253
|
+
* <td style="text-align: center">1..2</td>
|
254
|
+
* <td>09</td>
|
255
|
+
* <td rowspan="4"><b>Stand-Alone</b> Month - Use one or two for the numerical month, three for the abbreviation,
|
256
|
+
* four for the full (wide) name, or 5 for the narrow name. With two ("LL"), the month number is zero-padded if
|
257
|
+
* necessary (e.g. "08")</td>
|
258
|
+
* </tr>
|
259
|
+
* <tr>
|
260
|
+
* <td style="text-align: center">3</td>
|
261
|
+
* <td>Sep</td>
|
262
|
+
* </tr>
|
263
|
+
* <tr>
|
264
|
+
* <td style="text-align: center">4</td>
|
265
|
+
* <td>September</td>
|
266
|
+
* </tr>
|
267
|
+
* <tr>
|
268
|
+
* <td style="text-align: center">5</td>
|
269
|
+
* <td>S</td>
|
270
|
+
* </tr>
|
271
|
+
* <tr>
|
272
|
+
* <th rowspan="2">week</th>
|
273
|
+
* <td style="text-align: center">w</td>
|
274
|
+
* <td style="text-align: center">1..2</td>
|
275
|
+
* <td>27</td>
|
276
|
+
* <td>Week of Year. Use "w" to show the minimum number of digits, or "ww" to always show two digits
|
277
|
+
* (zero-padding if necessary, e.g. "08").</td>
|
278
|
+
* </tr>
|
279
|
+
* <tr>
|
280
|
+
* <td style="text-align: center">W</td>
|
281
|
+
* <td style="text-align: center">1</td>
|
282
|
+
* <td>3</td>
|
283
|
+
* <td>Week of Month</td>
|
284
|
+
* </tr>
|
285
|
+
* <tr>
|
286
|
+
* <th rowspan="4">day</th>
|
287
|
+
* <td style="text-align: center">d</td>
|
288
|
+
* <td style="text-align: center">1..2</td>
|
289
|
+
* <td>1</td>
|
290
|
+
* <td>Date - Day of the month. Use "d" to show the minimum number of digits, or "dd" to always show
|
291
|
+
* two digits (zero-padding if necessary, e.g. "08").</td>
|
292
|
+
* </tr>
|
293
|
+
* <tr>
|
294
|
+
* <td style="text-align: center">D</td>
|
295
|
+
* <td style="text-align: center">1..3</td>
|
296
|
+
* <td>345</td>
|
297
|
+
* <td>Day of year</td>
|
298
|
+
* </tr>
|
299
|
+
* <tr>
|
300
|
+
* <td style="text-align: center">F</td>
|
301
|
+
* <td style="text-align: center">1</td>
|
302
|
+
* <td>2</td>
|
303
|
+
* <td>Day of Week in Month. The example is for the 2nd Wed in July</td>
|
304
|
+
* </tr>
|
305
|
+
* <tr>
|
306
|
+
* <td style="text-align: center">g</td>
|
307
|
+
* <td style="text-align: center">1..n</td>
|
308
|
+
* <td>2451334</td>
|
309
|
+
* <td>Modified Julian day. This is different from the conventional Julian day number in two regards.
|
310
|
+
* First, it demarcates days at local zone midnight, rather than noon GMT. Second, it is a local number;
|
311
|
+
* that is, it depends on the local time zone. It can be thought of as a single number that encompasses
|
312
|
+
* all the date-related fields.</td>
|
313
|
+
* </tr>
|
314
|
+
* <tr>
|
315
|
+
* <th rowspan="14">week<br>
|
316
|
+
* day</th>
|
317
|
+
* <td rowspan="4" style="text-align: center">E</td>
|
318
|
+
* <td style="text-align: center">1..3</td>
|
319
|
+
* <td>Tue</td>
|
320
|
+
* <td rowspan="4">Day of week - Use one through three letters for the short day, four for the full (wide) name,
|
321
|
+
* five for the narrow name, or six for the short name.</td>
|
322
|
+
* </tr>
|
323
|
+
* <tr>
|
324
|
+
* <td style="text-align: center">4</td>
|
325
|
+
* <td>Tuesday</td>
|
326
|
+
* </tr>
|
327
|
+
* <tr>
|
328
|
+
* <td style="text-align: center">5</td>
|
329
|
+
* <td>T</td>
|
330
|
+
* </tr>
|
331
|
+
* <tr>
|
332
|
+
* <td style="text-align: center">6</td>
|
333
|
+
* <td>Tu</td>
|
334
|
+
* </tr>
|
335
|
+
* <tr>
|
336
|
+
* <td rowspan="5" style="text-align: center">e</td>
|
337
|
+
* <td style="text-align: center">1..2</td>
|
338
|
+
* <td>2</td>
|
339
|
+
* <td rowspan="5">Local day of week. Same as E except adds a numeric value that will depend on the local
|
340
|
+
* starting day of the week, using one or two letters. For this example, Monday is the first day of the week.</td>
|
341
|
+
* </tr>
|
342
|
+
* <tr>
|
343
|
+
* <td style="text-align: center">3</td>
|
344
|
+
* <td>Tue</td>
|
345
|
+
* </tr>
|
346
|
+
* <tr>
|
347
|
+
* <td style="text-align: center">4</td>
|
348
|
+
* <td>Tuesday</td>
|
349
|
+
* </tr>
|
350
|
+
* <tr>
|
351
|
+
* <td style="text-align: center">5</td>
|
352
|
+
* <td>T</td>
|
353
|
+
* </tr>
|
354
|
+
* <tr>
|
355
|
+
* <td style="text-align: center">6</td>
|
356
|
+
* <td>Tu</td>
|
357
|
+
* </tr>
|
358
|
+
* <tr>
|
359
|
+
* <td rowspan="5" style="text-align: center">c</td>
|
360
|
+
* <td style="text-align: center">1</td>
|
361
|
+
* <td>2</td>
|
362
|
+
* <td rowspan="5"><b>Stand-Alone</b> local day of week - Use one letter for the local numeric value (same
|
363
|
+
* as 'e'), three for the short day, four for the full (wide) name, five for the narrow name, or six for
|
364
|
+
* the short name.</td>
|
365
|
+
* </tr>
|
366
|
+
* <tr>
|
367
|
+
* <td style="text-align: center">3</td>
|
368
|
+
* <td>Tue</td>
|
369
|
+
* </tr>
|
370
|
+
* <tr>
|
371
|
+
* <td style="text-align: center">4</td>
|
372
|
+
* <td>Tuesday</td>
|
373
|
+
* </tr>
|
374
|
+
* <tr>
|
375
|
+
* <td style="text-align: center">5</td>
|
376
|
+
* <td>T</td>
|
377
|
+
* </tr>
|
378
|
+
* <tr>
|
379
|
+
* <td style="text-align: center">6</td>
|
380
|
+
* <td>Tu</td>
|
381
|
+
* </tr>
|
382
|
+
* <tr>
|
383
|
+
* <th>period</th>
|
384
|
+
* <td style="text-align: center">a</td>
|
385
|
+
* <td style="text-align: center">1</td>
|
386
|
+
* <td>AM</td>
|
387
|
+
* <td>AM or PM</td>
|
388
|
+
* </tr>
|
389
|
+
* <tr>
|
390
|
+
* <th rowspan="4">hour</th>
|
391
|
+
* <td style="text-align: center">h</td>
|
392
|
+
* <td style="text-align: center">1..2</td>
|
393
|
+
* <td>11</td>
|
394
|
+
* <td>Hour [1-12]. When used in skeleton data or in a skeleton passed in an API for flexible data pattern
|
395
|
+
* generation, it should match the 12-hour-cycle format preferred by the locale (h or K); it should not match
|
396
|
+
* a 24-hour-cycle format (H or k). Use hh for zero padding.</td>
|
397
|
+
* </tr>
|
398
|
+
* <tr>
|
399
|
+
* <td style="text-align: center">H</td>
|
400
|
+
* <td style="text-align: center">1..2</td>
|
401
|
+
* <td>13</td>
|
402
|
+
* <td>Hour [0-23]. When used in skeleton data or in a skeleton passed in an API for flexible data pattern
|
403
|
+
* generation, it should match the 24-hour-cycle format preferred by the locale (H or k); it should not match a
|
404
|
+
* 12-hour-cycle format (h or K). Use HH for zero padding.</td>
|
405
|
+
* </tr>
|
406
|
+
* <tr>
|
407
|
+
* <td style="text-align: center">K</td>
|
408
|
+
* <td style="text-align: center">1..2</td>
|
409
|
+
* <td>0</td>
|
410
|
+
* <td>Hour [0-11]. When used in a skeleton, only matches K or h, see above. Use KK for zero padding.</td>
|
411
|
+
* </tr>
|
412
|
+
* <tr>
|
413
|
+
* <td style="text-align: center">k</td>
|
414
|
+
* <td style="text-align: center">1..2</td>
|
415
|
+
* <td>24</td>
|
416
|
+
* <td>Hour [1-24]. When used in a skeleton, only matches k or H, see above. Use kk for zero padding.</td>
|
417
|
+
* </tr>
|
418
|
+
* <tr>
|
419
|
+
* <th>minute</th>
|
420
|
+
* <td style="text-align: center">m</td>
|
421
|
+
* <td style="text-align: center">1..2</td>
|
422
|
+
* <td>59</td>
|
423
|
+
* <td>Minute. Use "m" to show the minimum number of digits, or "mm" to always show two digits
|
424
|
+
* (zero-padding if necessary, e.g. "08").</td>
|
425
|
+
* </tr>
|
426
|
+
* <tr>
|
427
|
+
* <th rowspan="3">second</th>
|
428
|
+
* <td style="text-align: center">s</td>
|
429
|
+
* <td style="text-align: center">1..2</td>
|
430
|
+
* <td>12</td>
|
431
|
+
* <td>Second. Use "s" to show the minimum number of digits, or "ss" to always show two digits
|
432
|
+
* (zero-padding if necessary, e.g. "08").</td>
|
433
|
+
* </tr>
|
434
|
+
* <tr>
|
435
|
+
* <td style="text-align: center">S</td>
|
436
|
+
* <td style="text-align: center">1..n</td>
|
437
|
+
* <td>3450</td>
|
438
|
+
* <td>Fractional Second - truncates (like other time fields) to the count of letters when formatting.
|
439
|
+
* Appends zeros if more than 3 letters specified. Truncates at three significant digits when parsing.
|
440
|
+
* (example shows display using pattern SSSS for seconds value 12.34567)</td>
|
441
|
+
* </tr>
|
442
|
+
* <tr>
|
443
|
+
* <td style="text-align: center">A</td>
|
444
|
+
* <td style="text-align: center">1..n</td>
|
445
|
+
* <td>69540000</td>
|
446
|
+
* <td>Milliseconds in day. This field behaves <i>exactly</i> like a composite of all time-related fields,
|
447
|
+
* not including the zone fields. As such, it also reflects discontinuities of those fields on DST transition
|
448
|
+
* days. On a day of DST onset, it will jump forward. On a day of DST cessation, it will jump backward. This
|
449
|
+
* reflects the fact that is must be combined with the offset field to obtain a unique local time value.</td>
|
450
|
+
* </tr>
|
451
|
+
* <tr>
|
452
|
+
* <th rowspan="23">zone</th>
|
453
|
+
* <td rowspan="2" style="text-align: center">z</td>
|
454
|
+
* <td style="text-align: center">1..3</td>
|
455
|
+
* <td>PDT</td>
|
456
|
+
* <td>The <i>short specific non-location format</i>.
|
457
|
+
* Where that is unavailable, falls back to the <i>short localized GMT format</i> ("O").</td>
|
458
|
+
* </tr>
|
459
|
+
* <tr>
|
460
|
+
* <td style="text-align: center">4</td>
|
461
|
+
* <td>Pacific Daylight Time</td>
|
462
|
+
* <td>The <i>long specific non-location format</i>.
|
463
|
+
* Where that is unavailable, falls back to the <i>long localized GMT format</i> ("OOOO").</td>
|
464
|
+
* </tr>
|
465
|
+
* <tr>
|
466
|
+
* <td rowspan="3" style="text-align: center">Z</td>
|
467
|
+
* <td style="text-align: center">1..3</td>
|
468
|
+
* <td>-0800</td>
|
469
|
+
* <td>The <i>ISO8601 basic format</i> with hours, minutes and optional seconds fields.
|
470
|
+
* The format is equivalent to RFC 822 zone format (when optional seconds field is absent).
|
471
|
+
* This is equivalent to the "xxxx" specifier.</td>
|
472
|
+
* </tr>
|
473
|
+
* <tr>
|
474
|
+
* <td style="text-align: center">4</td>
|
475
|
+
* <td>GMT-8:00</td>
|
476
|
+
* <td>The <i>long localized GMT format</i>.
|
477
|
+
* This is equivalent to the "OOOO" specifier.</td>
|
478
|
+
* </tr>
|
479
|
+
* <tr>
|
480
|
+
* <td style="text-align: center">5</td>
|
481
|
+
* <td>-08:00<br>
|
482
|
+
* -07:52:58</td>
|
483
|
+
* <td>The <i>ISO8601 extended format</i> with hours, minutes and optional seconds fields.
|
484
|
+
* The ISO8601 UTC indicator "Z" is used when local time offset is 0.
|
485
|
+
* This is equivalent to the "XXXXX" specifier.</td>
|
486
|
+
* </tr>
|
487
|
+
* <tr>
|
488
|
+
* <td rowspan="2" style="text-align: center">O</td>
|
489
|
+
* <td style="text-align: center">1</td>
|
490
|
+
* <td>GMT-8</td>
|
491
|
+
* <td>The <i>short localized GMT format</i>.</td>
|
492
|
+
* </tr>
|
493
|
+
* <tr>
|
494
|
+
* <td style="text-align: center">4</td>
|
495
|
+
* <td>GMT-08:00</td>
|
496
|
+
* <td>The <i>long localized GMT format</i>.</td>
|
497
|
+
* </tr>
|
498
|
+
* <tr>
|
499
|
+
* <td rowspan="2" style="text-align: center">v</td>
|
500
|
+
* <td style="text-align: center">1</td>
|
501
|
+
* <td>PT</td>
|
502
|
+
* <td>The <i>short generic non-location format</i>.
|
503
|
+
* Where that is unavailable, falls back to the <i>generic location format</i> ("VVVV"),
|
504
|
+
* then the <i>short localized GMT format</i> as the final fallback.</td>
|
505
|
+
* </tr>
|
506
|
+
* <tr>
|
507
|
+
* <td style="text-align: center">4</td>
|
508
|
+
* <td>Pacific Time</td>
|
509
|
+
* <td>The <i>long generic non-location format</i>.
|
510
|
+
* Where that is unavailable, falls back to <i>generic location format</i> ("VVVV").
|
511
|
+
* </tr>
|
512
|
+
* <tr>
|
513
|
+
* <td rowspan="4" style="text-align: center">V</td>
|
514
|
+
* <td style="text-align: center">1</td>
|
515
|
+
* <td>uslax</td>
|
516
|
+
* <td>The short time zone ID.
|
517
|
+
* Where that is unavailable, the special short time zone ID <i>unk</i> (Unknown Zone) is used.<br>
|
518
|
+
* <i><b>Note</b>: This specifier was originally used for a variant of the short specific non-location format,
|
519
|
+
* but it was deprecated in the later version of the LDML specification. In CLDR 23/ICU 51, the definition of
|
520
|
+
* the specifier was changed to designate a short time zone ID.</i></td>
|
521
|
+
* </tr>
|
522
|
+
* <tr>
|
523
|
+
* <td style="text-align: center">2</td>
|
524
|
+
* <td>America/Los_Angeles</td>
|
525
|
+
* <td>The long time zone ID.</td>
|
526
|
+
* </tr>
|
527
|
+
* <tr>
|
528
|
+
* <td style="text-align: center">3</td>
|
529
|
+
* <td>Los Angeles</td>
|
530
|
+
* <td>The exemplar city (location) for the time zone.
|
531
|
+
* Where that is unavailable, the localized exemplar city name for the special zone <i>Etc/Unknown</i> is used
|
532
|
+
* as the fallback (for example, "Unknown City"). </td>
|
533
|
+
* </tr>
|
534
|
+
* <tr>
|
535
|
+
* <td style="text-align: center">4</td>
|
536
|
+
* <td>Los Angeles Time</td>
|
537
|
+
* <td>The <i>generic location format</i>.
|
538
|
+
* Where that is unavailable, falls back to the <i>long localized GMT format</i> ("OOOO";
|
539
|
+
* Note: Fallback is only necessary with a GMT-style Time Zone ID, like Etc/GMT-830.)<br>
|
540
|
+
* This is especially useful when presenting possible timezone choices for user selection,
|
541
|
+
* since the naming is more uniform than the "v" format.</td>
|
542
|
+
* </tr>
|
543
|
+
* <tr>
|
544
|
+
* <td rowspan="5" style="text-align: center">X</td>
|
545
|
+
* <td style="text-align: center">1</td>
|
546
|
+
* <td>-08<br>
|
547
|
+
* +0530<br>
|
548
|
+
* Z</td>
|
549
|
+
* <td>The <i>ISO8601 basic format</i> with hours field and optional minutes field.
|
550
|
+
* The ISO8601 UTC indicator "Z" is used when local time offset is 0.</td>
|
551
|
+
* </tr>
|
552
|
+
* <tr>
|
553
|
+
* <td style="text-align: center">2</td>
|
554
|
+
* <td>-0800<br>
|
555
|
+
* Z</td>
|
556
|
+
* <td>The <i>ISO8601 basic format</i> with hours and minutes fields.
|
557
|
+
* The ISO8601 UTC indicator "Z" is used when local time offset is 0.</td>
|
558
|
+
* </tr>
|
559
|
+
* <tr>
|
560
|
+
* <td style="text-align: center">3</td>
|
561
|
+
* <td>-08:00<br>
|
562
|
+
* Z</td>
|
563
|
+
* <td>The <i>ISO8601 extended format</i> with hours and minutes fields.
|
564
|
+
* The ISO8601 UTC indicator "Z" is used when local time offset is 0.</td>
|
565
|
+
* </tr>
|
566
|
+
* <tr>
|
567
|
+
* <td style="text-align: center">4</td>
|
568
|
+
* <td>-0800<br>
|
569
|
+
* -075258<br>
|
570
|
+
* Z</td>
|
571
|
+
* <td>The <i>ISO8601 basic format</i> with hours, minutes and optional seconds fields.
|
572
|
+
* (Note: The seconds field is not supported by the ISO8601 specification.)
|
573
|
+
* The ISO8601 UTC indicator "Z" is used when local time offset is 0.</td>
|
574
|
+
* </tr>
|
575
|
+
* <tr>
|
576
|
+
* <td style="text-align: center">5</td>
|
577
|
+
* <td>-08:00<br>
|
578
|
+
* -07:52:58<br>
|
579
|
+
* Z</td>
|
580
|
+
* <td>The <i>ISO8601 extended format</i> with hours, minutes and optional seconds fields.
|
581
|
+
* (Note: The seconds field is not supported by the ISO8601 specification.)
|
582
|
+
* The ISO8601 UTC indicator "Z" is used when local time offset is 0.</td>
|
583
|
+
* </tr>
|
584
|
+
* <tr>
|
585
|
+
* <td rowspan="5" style="text-align: center">x</td>
|
586
|
+
* <td style="text-align: center">1</td>
|
587
|
+
* <td>-08<br>
|
588
|
+
* +0530</td>
|
589
|
+
* <td>The <i>ISO8601 basic format</i> with hours field and optional minutes field.</td>
|
590
|
+
* </tr>
|
591
|
+
* <tr>
|
592
|
+
* <td style="text-align: center">2</td>
|
593
|
+
* <td>-0800</td>
|
594
|
+
* <td>The <i>ISO8601 basic format</i> with hours and minutes fields.</td>
|
595
|
+
* </tr>
|
596
|
+
* <tr>
|
597
|
+
* <td style="text-align: center">3</td>
|
598
|
+
* <td>-08:00</td>
|
599
|
+
* <td>The <i>ISO8601 extended format</i> with hours and minutes fields.</td>
|
600
|
+
* </tr>
|
601
|
+
* <tr>
|
602
|
+
* <td style="text-align: center">4</td>
|
603
|
+
* <td>-0800<br>
|
604
|
+
* -075258</td>
|
605
|
+
* <td>The <i>ISO8601 basic format</i> with hours, minutes and optional seconds fields.
|
606
|
+
* (Note: The seconds field is not supported by the ISO8601 specification.)</td>
|
607
|
+
* </tr>
|
608
|
+
* <tr>
|
609
|
+
* <td style="text-align: center">5</td>
|
610
|
+
* <td>-08:00<br>
|
611
|
+
* -07:52:58</td>
|
612
|
+
* <td>The <i>ISO8601 extended format</i> with hours, minutes and optional seconds fields.
|
613
|
+
* (Note: The seconds field is not supported by the ISO8601 specification.)</td>
|
614
|
+
* </tr>
|
615
|
+
* </table>
|
616
|
+
*
|
617
|
+
* <P>
|
618
|
+
* Any characters in the pattern that are not in the ranges of ['a'..'z'] and
|
619
|
+
* ['A'..'Z'] will be treated as quoted text. For instance, characters
|
620
|
+
* like ':', '.', ' ', '#' and '@' will appear in the resulting time text
|
621
|
+
* even they are not embraced within single quotes.
|
622
|
+
* <P>
|
623
|
+
* A pattern containing any invalid pattern letter will result in a failing
|
624
|
+
* UErrorCode result during formatting or parsing.
|
625
|
+
* <P>
|
626
|
+
* Examples using the US locale:
|
627
|
+
* <pre>
|
628
|
+
* \code
|
629
|
+
* Format Pattern Result
|
630
|
+
* -------------- -------
|
631
|
+
* "yyyy.MM.dd G 'at' HH:mm:ss vvvv" ->> 1996.07.10 AD at 15:08:56 Pacific Time
|
632
|
+
* "EEE, MMM d, ''yy" ->> Wed, July 10, '96
|
633
|
+
* "h:mm a" ->> 12:08 PM
|
634
|
+
* "hh 'o''clock' a, zzzz" ->> 12 o'clock PM, Pacific Daylight Time
|
635
|
+
* "K:mm a, vvv" ->> 0:00 PM, PT
|
636
|
+
* "yyyyy.MMMMM.dd GGG hh:mm aaa" ->> 1996.July.10 AD 12:08 PM
|
637
|
+
* \endcode
|
638
|
+
* </pre>
|
639
|
+
* Code Sample:
|
640
|
+
* <pre>
|
641
|
+
* \code
|
642
|
+
* UErrorCode success = U_ZERO_ERROR;
|
643
|
+
* SimpleTimeZone* pdt = new SimpleTimeZone(-8 * 60 * 60 * 1000, "PST");
|
644
|
+
* pdt->setStartRule( Calendar::APRIL, 1, Calendar::SUNDAY, 2*60*60*1000);
|
645
|
+
* pdt->setEndRule( Calendar::OCTOBER, -1, Calendar::SUNDAY, 2*60*60*1000);
|
646
|
+
*
|
647
|
+
* // Format the current time.
|
648
|
+
* SimpleDateFormat* formatter
|
649
|
+
* = new SimpleDateFormat ("yyyy.MM.dd G 'at' hh:mm:ss a zzz", success );
|
650
|
+
* GregorianCalendar cal(success);
|
651
|
+
* UDate currentTime_1 = cal.getTime(success);
|
652
|
+
* FieldPosition fp(0);
|
653
|
+
* UnicodeString dateString;
|
654
|
+
* formatter->format( currentTime_1, dateString, fp );
|
655
|
+
* cout << "result: " << dateString << endl;
|
656
|
+
*
|
657
|
+
* // Parse the previous string back into a Date.
|
658
|
+
* ParsePosition pp(0);
|
659
|
+
* UDate currentTime_2 = formatter->parse(dateString, pp );
|
660
|
+
* \endcode
|
661
|
+
* </pre>
|
662
|
+
* In the above example, the time value "currentTime_2" obtained from parsing
|
663
|
+
* will be equal to currentTime_1. However, they may not be equal if the am/pm
|
664
|
+
* marker 'a' is left out from the format pattern while the "hour in am/pm"
|
665
|
+
* pattern symbol is used. This information loss can happen when formatting the
|
666
|
+
* time in PM.
|
667
|
+
*
|
668
|
+
* <p>
|
669
|
+
* When parsing a date string using the abbreviated year pattern ("y" or "yy"),
|
670
|
+
* SimpleDateFormat must interpret the abbreviated year
|
671
|
+
* relative to some century. It does this by adjusting dates to be
|
672
|
+
* within 80 years before and 20 years after the time the SimpleDateFormat
|
673
|
+
* instance is created. For example, using a pattern of "MM/dd/yy" and a
|
674
|
+
* SimpleDateFormat instance created on Jan 1, 1997, the string
|
675
|
+
* "01/11/12" would be interpreted as Jan 11, 2012 while the string "05/04/64"
|
676
|
+
* would be interpreted as May 4, 1964.
|
677
|
+
* During parsing, only strings consisting of exactly two digits, as defined by
|
678
|
+
* <code>Unicode::isDigit()</code>, will be parsed into the default century.
|
679
|
+
* Any other numeric string, such as a one digit string, a three or more digit
|
680
|
+
* string, or a two digit string that isn't all digits (for example, "-1"), is
|
681
|
+
* interpreted literally. So "01/02/3" or "01/02/003" are parsed (for the
|
682
|
+
* Gregorian calendar), using the same pattern, as Jan 2, 3 AD. Likewise (but
|
683
|
+
* only in lenient parse mode, the default) "01/02/-3" is parsed as Jan 2, 4 BC.
|
684
|
+
*
|
685
|
+
* <p>
|
686
|
+
* If the year pattern has more than two 'y' characters, the year is
|
687
|
+
* interpreted literally, regardless of the number of digits. So using the
|
688
|
+
* pattern "MM/dd/yyyy", "01/11/12" parses to Jan 11, 12 A.D.
|
689
|
+
*
|
690
|
+
* <p>
|
691
|
+
* When numeric fields abut one another directly, with no intervening delimiter
|
692
|
+
* characters, they constitute a run of abutting numeric fields. Such runs are
|
693
|
+
* parsed specially. For example, the format "HHmmss" parses the input text
|
694
|
+
* "123456" to 12:34:56, parses the input text "12345" to 1:23:45, and fails to
|
695
|
+
* parse "1234". In other words, the leftmost field of the run is flexible,
|
696
|
+
* while the others keep a fixed width. If the parse fails anywhere in the run,
|
697
|
+
* then the leftmost field is shortened by one character, and the entire run is
|
698
|
+
* parsed again. This is repeated until either the parse succeeds or the
|
699
|
+
* leftmost field is one character in length. If the parse still fails at that
|
700
|
+
* point, the parse of the run fails.
|
701
|
+
*
|
702
|
+
* <P>
|
703
|
+
* For time zones that have no names, SimpleDateFormat uses strings GMT+hours:minutes or
|
704
|
+
* GMT-hours:minutes.
|
705
|
+
* <P>
|
706
|
+
* The calendar defines what is the first day of the week, the first week of the
|
707
|
+
* year, whether hours are zero based or not (0 vs 12 or 24), and the timezone.
|
708
|
+
* There is one common number format to handle all the numbers; the digit count
|
709
|
+
* is handled programmatically according to the pattern.
|
710
|
+
*
|
711
|
+
* <p><em>User subclasses are not supported.</em> While clients may write
|
712
|
+
* subclasses, such code will not necessarily work and will not be
|
713
|
+
* guaranteed to work stably from release to release.
|
714
|
+
*/
|
715
|
+
class U_I18N_API SimpleDateFormat: public DateFormat {
|
716
|
+
public:
|
717
|
+
/**
|
718
|
+
* Construct a SimpleDateFormat using the default pattern for the default
|
719
|
+
* locale.
|
720
|
+
* <P>
|
721
|
+
* [Note:] Not all locales support SimpleDateFormat; for full generality,
|
722
|
+
* use the factory methods in the DateFormat class.
|
723
|
+
* @param status Output param set to success/failure code.
|
724
|
+
* @stable ICU 2.0
|
725
|
+
*/
|
726
|
+
SimpleDateFormat(UErrorCode& status);
|
727
|
+
|
728
|
+
/**
|
729
|
+
* Construct a SimpleDateFormat using the given pattern and the default locale.
|
730
|
+
* The locale is used to obtain the symbols used in formatting (e.g., the
|
731
|
+
* names of the months), but not to provide the pattern.
|
732
|
+
* <P>
|
733
|
+
* [Note:] Not all locales support SimpleDateFormat; for full generality,
|
734
|
+
* use the factory methods in the DateFormat class.
|
735
|
+
* @param pattern the pattern for the format.
|
736
|
+
* @param status Output param set to success/failure code.
|
737
|
+
* @stable ICU 2.0
|
738
|
+
*/
|
739
|
+
SimpleDateFormat(const UnicodeString& pattern,
|
740
|
+
UErrorCode& status);
|
741
|
+
|
742
|
+
/**
|
743
|
+
* Construct a SimpleDateFormat using the given pattern, numbering system override, and the default locale.
|
744
|
+
* The locale is used to obtain the symbols used in formatting (e.g., the
|
745
|
+
* names of the months), but not to provide the pattern.
|
746
|
+
* <P>
|
747
|
+
* A numbering system override is a string containing either the name of a known numbering system,
|
748
|
+
* or a set of field and numbering system pairs that specify which fields are to be formattied with
|
749
|
+
* the alternate numbering system. For example, to specify that all numeric fields in the specified
|
750
|
+
* date or time pattern are to be rendered using Thai digits, simply specify the numbering system override
|
751
|
+
* as "thai". To specify that just the year portion of the date be formatted using Hebrew numbering,
|
752
|
+
* use the override string "y=hebrew". Numbering system overrides can be combined using a semi-colon
|
753
|
+
* character in the override string, such as "d=decimal;M=arabic;y=hebrew", etc.
|
754
|
+
*
|
755
|
+
* <P>
|
756
|
+
* [Note:] Not all locales support SimpleDateFormat; for full generality,
|
757
|
+
* use the factory methods in the DateFormat class.
|
758
|
+
* @param pattern the pattern for the format.
|
759
|
+
* @param override the override string.
|
760
|
+
* @param status Output param set to success/failure code.
|
761
|
+
* @stable ICU 4.2
|
762
|
+
*/
|
763
|
+
SimpleDateFormat(const UnicodeString& pattern,
|
764
|
+
const UnicodeString& override,
|
765
|
+
UErrorCode& status);
|
766
|
+
|
767
|
+
/**
|
768
|
+
* Construct a SimpleDateFormat using the given pattern and locale.
|
769
|
+
* The locale is used to obtain the symbols used in formatting (e.g., the
|
770
|
+
* names of the months), but not to provide the pattern.
|
771
|
+
* <P>
|
772
|
+
* [Note:] Not all locales support SimpleDateFormat; for full generality,
|
773
|
+
* use the factory methods in the DateFormat class.
|
774
|
+
* @param pattern the pattern for the format.
|
775
|
+
* @param locale the given locale.
|
776
|
+
* @param status Output param set to success/failure code.
|
777
|
+
* @stable ICU 2.0
|
778
|
+
*/
|
779
|
+
SimpleDateFormat(const UnicodeString& pattern,
|
780
|
+
const Locale& locale,
|
781
|
+
UErrorCode& status);
|
782
|
+
|
783
|
+
/**
|
784
|
+
* Construct a SimpleDateFormat using the given pattern, numbering system override, and locale.
|
785
|
+
* The locale is used to obtain the symbols used in formatting (e.g., the
|
786
|
+
* names of the months), but not to provide the pattern.
|
787
|
+
* <P>
|
788
|
+
* A numbering system override is a string containing either the name of a known numbering system,
|
789
|
+
* or a set of field and numbering system pairs that specify which fields are to be formattied with
|
790
|
+
* the alternate numbering system. For example, to specify that all numeric fields in the specified
|
791
|
+
* date or time pattern are to be rendered using Thai digits, simply specify the numbering system override
|
792
|
+
* as "thai". To specify that just the year portion of the date be formatted using Hebrew numbering,
|
793
|
+
* use the override string "y=hebrew". Numbering system overrides can be combined using a semi-colon
|
794
|
+
* character in the override string, such as "d=decimal;M=arabic;y=hebrew", etc.
|
795
|
+
* <P>
|
796
|
+
* [Note:] Not all locales support SimpleDateFormat; for full generality,
|
797
|
+
* use the factory methods in the DateFormat class.
|
798
|
+
* @param pattern the pattern for the format.
|
799
|
+
* @param override the numbering system override.
|
800
|
+
* @param locale the given locale.
|
801
|
+
* @param status Output param set to success/failure code.
|
802
|
+
* @stable ICU 4.2
|
803
|
+
*/
|
804
|
+
SimpleDateFormat(const UnicodeString& pattern,
|
805
|
+
const UnicodeString& override,
|
806
|
+
const Locale& locale,
|
807
|
+
UErrorCode& status);
|
808
|
+
|
809
|
+
/**
|
810
|
+
* Construct a SimpleDateFormat using the given pattern and locale-specific
|
811
|
+
* symbol data. The formatter takes ownership of the DateFormatSymbols object;
|
812
|
+
* the caller is no longer responsible for deleting it.
|
813
|
+
* @param pattern the given pattern for the format.
|
814
|
+
* @param formatDataToAdopt the symbols to be adopted.
|
815
|
+
* @param status Output param set to success/faulure code.
|
816
|
+
* @stable ICU 2.0
|
817
|
+
*/
|
818
|
+
SimpleDateFormat(const UnicodeString& pattern,
|
819
|
+
DateFormatSymbols* formatDataToAdopt,
|
820
|
+
UErrorCode& status);
|
821
|
+
|
822
|
+
/**
|
823
|
+
* Construct a SimpleDateFormat using the given pattern and locale-specific
|
824
|
+
* symbol data. The DateFormatSymbols object is NOT adopted; the caller
|
825
|
+
* remains responsible for deleting it.
|
826
|
+
* @param pattern the given pattern for the format.
|
827
|
+
* @param formatData the formatting symbols to be use.
|
828
|
+
* @param status Output param set to success/faulure code.
|
829
|
+
* @stable ICU 2.0
|
830
|
+
*/
|
831
|
+
SimpleDateFormat(const UnicodeString& pattern,
|
832
|
+
const DateFormatSymbols& formatData,
|
833
|
+
UErrorCode& status);
|
834
|
+
|
835
|
+
/**
|
836
|
+
* Copy constructor.
|
837
|
+
* @stable ICU 2.0
|
838
|
+
*/
|
839
|
+
SimpleDateFormat(const SimpleDateFormat&);
|
840
|
+
|
841
|
+
/**
|
842
|
+
* Assignment operator.
|
843
|
+
* @stable ICU 2.0
|
844
|
+
*/
|
845
|
+
SimpleDateFormat& operator=(const SimpleDateFormat&);
|
846
|
+
|
847
|
+
/**
|
848
|
+
* Destructor.
|
849
|
+
* @stable ICU 2.0
|
850
|
+
*/
|
851
|
+
virtual ~SimpleDateFormat();
|
852
|
+
|
853
|
+
/**
|
854
|
+
* Clone this Format object polymorphically. The caller owns the result and
|
855
|
+
* should delete it when done.
|
856
|
+
* @return A copy of the object.
|
857
|
+
* @stable ICU 2.0
|
858
|
+
*/
|
859
|
+
virtual Format* clone(void) const;
|
860
|
+
|
861
|
+
/**
|
862
|
+
* Return true if the given Format objects are semantically equal. Objects
|
863
|
+
* of different subclasses are considered unequal.
|
864
|
+
* @param other the object to be compared with.
|
865
|
+
* @return true if the given Format objects are semantically equal.
|
866
|
+
* @stable ICU 2.0
|
867
|
+
*/
|
868
|
+
virtual UBool operator==(const Format& other) const;
|
869
|
+
|
870
|
+
|
871
|
+
using DateFormat::format;
|
872
|
+
|
873
|
+
/**
|
874
|
+
* Format a date or time, which is the standard millis since 24:00 GMT, Jan
|
875
|
+
* 1, 1970. Overrides DateFormat pure virtual method.
|
876
|
+
* <P>
|
877
|
+
* Example: using the US locale: "yyyy.MM.dd e 'at' HH:mm:ss zzz" ->>
|
878
|
+
* 1996.07.10 AD at 15:08:56 PDT
|
879
|
+
*
|
880
|
+
* @param cal Calendar set to the date and time to be formatted
|
881
|
+
* into a date/time string.
|
882
|
+
* @param appendTo Output parameter to receive result.
|
883
|
+
* Result is appended to existing contents.
|
884
|
+
* @param pos The formatting position. On input: an alignment field,
|
885
|
+
* if desired. On output: the offsets of the alignment field.
|
886
|
+
* @return Reference to 'appendTo' parameter.
|
887
|
+
* @stable ICU 2.1
|
888
|
+
*/
|
889
|
+
virtual UnicodeString& format( Calendar& cal,
|
890
|
+
UnicodeString& appendTo,
|
891
|
+
FieldPosition& pos) const;
|
892
|
+
|
893
|
+
/**
|
894
|
+
* Format a date or time, which is the standard millis since 24:00 GMT, Jan
|
895
|
+
* 1, 1970. Overrides DateFormat pure virtual method.
|
896
|
+
* <P>
|
897
|
+
* Example: using the US locale: "yyyy.MM.dd e 'at' HH:mm:ss zzz" ->>
|
898
|
+
* 1996.07.10 AD at 15:08:56 PDT
|
899
|
+
*
|
900
|
+
* @param cal Calendar set to the date and time to be formatted
|
901
|
+
* into a date/time string.
|
902
|
+
* @param appendTo Output parameter to receive result.
|
903
|
+
* Result is appended to existing contents.
|
904
|
+
* @param posIter On return, can be used to iterate over positions
|
905
|
+
* of fields generated by this format call. Field values
|
906
|
+
* are defined in UDateFormatField.
|
907
|
+
* @param status Input/output param set to success/failure code.
|
908
|
+
* @return Reference to 'appendTo' parameter.
|
909
|
+
* @stable ICU 4.4
|
910
|
+
*/
|
911
|
+
virtual UnicodeString& format( Calendar& cal,
|
912
|
+
UnicodeString& appendTo,
|
913
|
+
FieldPositionIterator* posIter,
|
914
|
+
UErrorCode& status) const;
|
915
|
+
|
916
|
+
using DateFormat::parse;
|
917
|
+
|
918
|
+
/**
|
919
|
+
* Parse a date/time string beginning at the given parse position. For
|
920
|
+
* example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Date
|
921
|
+
* that is equivalent to Date(837039928046).
|
922
|
+
* <P>
|
923
|
+
* By default, parsing is lenient: If the input is not in the form used by
|
924
|
+
* this object's format method but can still be parsed as a date, then the
|
925
|
+
* parse succeeds. Clients may insist on strict adherence to the format by
|
926
|
+
* calling setLenient(false).
|
927
|
+
* @see DateFormat::setLenient(boolean)
|
928
|
+
*
|
929
|
+
* @param text The date/time string to be parsed
|
930
|
+
* @param cal A Calendar set on input to the date and time to be used for
|
931
|
+
* missing values in the date/time string being parsed, and set
|
932
|
+
* on output to the parsed date/time. When the calendar type is
|
933
|
+
* different from the internal calendar held by this SimpleDateFormat
|
934
|
+
* instance, the internal calendar will be cloned to a work
|
935
|
+
* calendar set to the same milliseconds and time zone as the
|
936
|
+
* cal parameter, field values will be parsed based on the work
|
937
|
+
* calendar, then the result (milliseconds and time zone) will
|
938
|
+
* be set in this calendar.
|
939
|
+
* @param pos On input, the position at which to start parsing; on
|
940
|
+
* output, the position at which parsing terminated, or the
|
941
|
+
* start position if the parse failed.
|
942
|
+
* @stable ICU 2.1
|
943
|
+
*/
|
944
|
+
virtual void parse( const UnicodeString& text,
|
945
|
+
Calendar& cal,
|
946
|
+
ParsePosition& pos) const;
|
947
|
+
|
948
|
+
|
949
|
+
/**
|
950
|
+
* Set the start UDate used to interpret two-digit year strings.
|
951
|
+
* When dates are parsed having 2-digit year strings, they are placed within
|
952
|
+
* a assumed range of 100 years starting on the two digit start date. For
|
953
|
+
* example, the string "24-Jan-17" may be in the year 1817, 1917, 2017, or
|
954
|
+
* some other year. SimpleDateFormat chooses a year so that the resultant
|
955
|
+
* date is on or after the two digit start date and within 100 years of the
|
956
|
+
* two digit start date.
|
957
|
+
* <P>
|
958
|
+
* By default, the two digit start date is set to 80 years before the current
|
959
|
+
* time at which a SimpleDateFormat object is created.
|
960
|
+
* @param d start UDate used to interpret two-digit year strings.
|
961
|
+
* @param status Filled in with U_ZERO_ERROR if the parse was successful, and with
|
962
|
+
* an error value if there was a parse error.
|
963
|
+
* @stable ICU 2.0
|
964
|
+
*/
|
965
|
+
virtual void set2DigitYearStart(UDate d, UErrorCode& status);
|
966
|
+
|
967
|
+
/**
|
968
|
+
* Get the start UDate used to interpret two-digit year strings.
|
969
|
+
* When dates are parsed having 2-digit year strings, they are placed within
|
970
|
+
* a assumed range of 100 years starting on the two digit start date. For
|
971
|
+
* example, the string "24-Jan-17" may be in the year 1817, 1917, 2017, or
|
972
|
+
* some other year. SimpleDateFormat chooses a year so that the resultant
|
973
|
+
* date is on or after the two digit start date and within 100 years of the
|
974
|
+
* two digit start date.
|
975
|
+
* <P>
|
976
|
+
* By default, the two digit start date is set to 80 years before the current
|
977
|
+
* time at which a SimpleDateFormat object is created.
|
978
|
+
* @param status Filled in with U_ZERO_ERROR if the parse was successful, and with
|
979
|
+
* an error value if there was a parse error.
|
980
|
+
* @stable ICU 2.0
|
981
|
+
*/
|
982
|
+
UDate get2DigitYearStart(UErrorCode& status) const;
|
983
|
+
|
984
|
+
/**
|
985
|
+
* Return a pattern string describing this date format.
|
986
|
+
* @param result Output param to receive the pattern.
|
987
|
+
* @return A reference to 'result'.
|
988
|
+
* @stable ICU 2.0
|
989
|
+
*/
|
990
|
+
virtual UnicodeString& toPattern(UnicodeString& result) const;
|
991
|
+
|
992
|
+
/**
|
993
|
+
* Return a localized pattern string describing this date format.
|
994
|
+
* In most cases, this will return the same thing as toPattern(),
|
995
|
+
* but a locale can specify characters to use in pattern descriptions
|
996
|
+
* in place of the ones described in this class's class documentation.
|
997
|
+
* (Presumably, letters that would be more mnemonic in that locale's
|
998
|
+
* language.) This function would produce a pattern using those
|
999
|
+
* letters.
|
1000
|
+
*
|
1001
|
+
* @param result Receives the localized pattern.
|
1002
|
+
* @param status Output param set to success/failure code on
|
1003
|
+
* exit. If the pattern is invalid, this will be
|
1004
|
+
* set to a failure result.
|
1005
|
+
* @return A reference to 'result'.
|
1006
|
+
* @stable ICU 2.0
|
1007
|
+
*/
|
1008
|
+
virtual UnicodeString& toLocalizedPattern(UnicodeString& result,
|
1009
|
+
UErrorCode& status) const;
|
1010
|
+
|
1011
|
+
/**
|
1012
|
+
* Apply the given unlocalized pattern string to this date format.
|
1013
|
+
* (i.e., after this call, this formatter will format dates according to
|
1014
|
+
* the new pattern)
|
1015
|
+
*
|
1016
|
+
* @param pattern The pattern to be applied.
|
1017
|
+
* @stable ICU 2.0
|
1018
|
+
*/
|
1019
|
+
virtual void applyPattern(const UnicodeString& pattern);
|
1020
|
+
|
1021
|
+
/**
|
1022
|
+
* Apply the given localized pattern string to this date format.
|
1023
|
+
* (see toLocalizedPattern() for more information on localized patterns.)
|
1024
|
+
*
|
1025
|
+
* @param pattern The localized pattern to be applied.
|
1026
|
+
* @param status Output param set to success/failure code on
|
1027
|
+
* exit. If the pattern is invalid, this will be
|
1028
|
+
* set to a failure result.
|
1029
|
+
* @stable ICU 2.0
|
1030
|
+
*/
|
1031
|
+
virtual void applyLocalizedPattern(const UnicodeString& pattern,
|
1032
|
+
UErrorCode& status);
|
1033
|
+
|
1034
|
+
/**
|
1035
|
+
* Gets the date/time formatting symbols (this is an object carrying
|
1036
|
+
* the various strings and other symbols used in formatting: e.g., month
|
1037
|
+
* names and abbreviations, time zone names, AM/PM strings, etc.)
|
1038
|
+
* @return a copy of the date-time formatting data associated
|
1039
|
+
* with this date-time formatter.
|
1040
|
+
* @stable ICU 2.0
|
1041
|
+
*/
|
1042
|
+
virtual const DateFormatSymbols* getDateFormatSymbols(void) const;
|
1043
|
+
|
1044
|
+
/**
|
1045
|
+
* Set the date/time formatting symbols. The caller no longer owns the
|
1046
|
+
* DateFormatSymbols object and should not delete it after making this call.
|
1047
|
+
* @param newFormatSymbols the given date-time formatting symbols to copy.
|
1048
|
+
* @stable ICU 2.0
|
1049
|
+
*/
|
1050
|
+
virtual void adoptDateFormatSymbols(DateFormatSymbols* newFormatSymbols);
|
1051
|
+
|
1052
|
+
/**
|
1053
|
+
* Set the date/time formatting data.
|
1054
|
+
* @param newFormatSymbols the given date-time formatting symbols to copy.
|
1055
|
+
* @stable ICU 2.0
|
1056
|
+
*/
|
1057
|
+
virtual void setDateFormatSymbols(const DateFormatSymbols& newFormatSymbols);
|
1058
|
+
|
1059
|
+
/**
|
1060
|
+
* Return the class ID for this class. This is useful only for comparing to
|
1061
|
+
* a return value from getDynamicClassID(). For example:
|
1062
|
+
* <pre>
|
1063
|
+
* . Base* polymorphic_pointer = createPolymorphicObject();
|
1064
|
+
* . if (polymorphic_pointer->getDynamicClassID() ==
|
1065
|
+
* . erived::getStaticClassID()) ...
|
1066
|
+
* </pre>
|
1067
|
+
* @return The class ID for all objects of this class.
|
1068
|
+
* @stable ICU 2.0
|
1069
|
+
*/
|
1070
|
+
static UClassID U_EXPORT2 getStaticClassID(void);
|
1071
|
+
|
1072
|
+
/**
|
1073
|
+
* Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This
|
1074
|
+
* method is to implement a simple version of RTTI, since not all C++
|
1075
|
+
* compilers support genuine RTTI. Polymorphic operator==() and clone()
|
1076
|
+
* methods call this method.
|
1077
|
+
*
|
1078
|
+
* @return The class ID for this object. All objects of a
|
1079
|
+
* given class have the same class ID. Objects of
|
1080
|
+
* other classes have different class IDs.
|
1081
|
+
* @stable ICU 2.0
|
1082
|
+
*/
|
1083
|
+
virtual UClassID getDynamicClassID(void) const;
|
1084
|
+
|
1085
|
+
/**
|
1086
|
+
* Set the calendar to be used by this date format. Initially, the default
|
1087
|
+
* calendar for the specified or default locale is used. The caller should
|
1088
|
+
* not delete the Calendar object after it is adopted by this call.
|
1089
|
+
* Adopting a new calendar will change to the default symbols.
|
1090
|
+
*
|
1091
|
+
* @param calendarToAdopt Calendar object to be adopted.
|
1092
|
+
* @stable ICU 2.0
|
1093
|
+
*/
|
1094
|
+
virtual void adoptCalendar(Calendar* calendarToAdopt);
|
1095
|
+
|
1096
|
+
/* Cannot use #ifndef U_HIDE_INTERNAL_API for the following methods since they are virtual */
|
1097
|
+
/**
|
1098
|
+
* Sets the TimeZoneFormat to be used by this date/time formatter.
|
1099
|
+
* The caller should not delete the TimeZoneFormat object after
|
1100
|
+
* it is adopted by this call.
|
1101
|
+
* @param timeZoneFormatToAdopt The TimeZoneFormat object to be adopted.
|
1102
|
+
* @internal ICU 49 technology preview
|
1103
|
+
*/
|
1104
|
+
virtual void adoptTimeZoneFormat(TimeZoneFormat* timeZoneFormatToAdopt);
|
1105
|
+
|
1106
|
+
/**
|
1107
|
+
* Sets the TimeZoneFormat to be used by this date/time formatter.
|
1108
|
+
* @param newTimeZoneFormat The TimeZoneFormat object to copy.
|
1109
|
+
* @internal ICU 49 technology preview
|
1110
|
+
*/
|
1111
|
+
virtual void setTimeZoneFormat(const TimeZoneFormat& newTimeZoneFormat);
|
1112
|
+
|
1113
|
+
/**
|
1114
|
+
* Gets the time zone format object associated with this date/time formatter.
|
1115
|
+
* @return the time zone format associated with this date/time formatter.
|
1116
|
+
* @internal ICU 49 technology preview
|
1117
|
+
*/
|
1118
|
+
virtual const TimeZoneFormat* getTimeZoneFormat(void) const;
|
1119
|
+
|
1120
|
+
/* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since it is virtual */
|
1121
|
+
/**
|
1122
|
+
* Set a particular UDisplayContext value in the formatter, such as
|
1123
|
+
* UDISPCTX_CAPITALIZATION_FOR_STANDALONE. Note: For getContext, see
|
1124
|
+
* DateFormat.
|
1125
|
+
* @param value The UDisplayContext value to set.
|
1126
|
+
* @param status Input/output status. If at entry this indicates a failure
|
1127
|
+
* status, the function will do nothing; otherwise this will be
|
1128
|
+
* updated with any new status from the function.
|
1129
|
+
* @draft ICU 53
|
1130
|
+
*/
|
1131
|
+
virtual void setContext(UDisplayContext value, UErrorCode& status);
|
1132
|
+
|
1133
|
+
#ifndef U_HIDE_DRAFT_API
|
1134
|
+
/**
|
1135
|
+
* Overrides base class method and
|
1136
|
+
* This method clears per field NumberFormat instances
|
1137
|
+
* previously set by {@see adoptNumberFormat(const UnicodeString&, NumberFormat*, UErrorCode)}
|
1138
|
+
* @param adoptNF the NumbeferFormat used
|
1139
|
+
* @draft ICU 54
|
1140
|
+
*/
|
1141
|
+
void adoptNumberFormat(NumberFormat *formatToAdopt);
|
1142
|
+
|
1143
|
+
/**
|
1144
|
+
* Allow the user to set the NumberFormat for several fields
|
1145
|
+
* It can be a single field like: "y"(year) or "M"(month)
|
1146
|
+
* It can be several field combined together: "yM"(year and month)
|
1147
|
+
* Note:
|
1148
|
+
* 1 symbol field is enough for multiple symbol field (so "y" will override "yy", "yyy")
|
1149
|
+
* If the field is not numeric, then override has no effect (like "MMM" will use abbreviation, not numerical field)
|
1150
|
+
* Per field NumberFormat can also be cleared in {@see DateFormat::setNumberFormat(const NumberFormat& newNumberFormat)}
|
1151
|
+
*
|
1152
|
+
* @param fields the fields to override(like y)
|
1153
|
+
* @param adoptNF the NumbeferFormat used
|
1154
|
+
* @param status Receives a status code, which will be U_ZERO_ERROR
|
1155
|
+
* if the operation succeeds.
|
1156
|
+
* @draft ICU 54
|
1157
|
+
*/
|
1158
|
+
void adoptNumberFormat(const UnicodeString& fields, NumberFormat *formatToAdopt, UErrorCode &status);
|
1159
|
+
|
1160
|
+
/**
|
1161
|
+
* Get the numbering system to be used for a particular field.
|
1162
|
+
* @param field The UDateFormatField to get
|
1163
|
+
* @draft ICU 54
|
1164
|
+
*/
|
1165
|
+
const NumberFormat * getNumberFormatForField(UChar field) const;
|
1166
|
+
#endif /* U_HIDE_DRAFT_API */
|
1167
|
+
|
1168
|
+
#ifndef U_HIDE_INTERNAL_API
|
1169
|
+
/**
|
1170
|
+
* This is for ICU internal use only. Please do not use.
|
1171
|
+
* Check whether the 'field' is smaller than all the fields covered in
|
1172
|
+
* pattern, return TRUE if it is. The sequence of calendar field,
|
1173
|
+
* from large to small is: ERA, YEAR, MONTH, DATE, AM_PM, HOUR, MINUTE,...
|
1174
|
+
* @param field the calendar field need to check against
|
1175
|
+
* @return TRUE if the 'field' is smaller than all the fields
|
1176
|
+
* covered in pattern. FALSE otherwise.
|
1177
|
+
* @internal ICU 4.0
|
1178
|
+
*/
|
1179
|
+
UBool isFieldUnitIgnored(UCalendarDateFields field) const;
|
1180
|
+
|
1181
|
+
|
1182
|
+
/**
|
1183
|
+
* This is for ICU internal use only. Please do not use.
|
1184
|
+
* Check whether the 'field' is smaller than all the fields covered in
|
1185
|
+
* pattern, return TRUE if it is. The sequence of calendar field,
|
1186
|
+
* from large to small is: ERA, YEAR, MONTH, DATE, AM_PM, HOUR, MINUTE,...
|
1187
|
+
* @param pattern the pattern to check against
|
1188
|
+
* @param field the calendar field need to check against
|
1189
|
+
* @return TRUE if the 'field' is smaller than all the fields
|
1190
|
+
* covered in pattern. FALSE otherwise.
|
1191
|
+
* @internal ICU 4.0
|
1192
|
+
*/
|
1193
|
+
static UBool isFieldUnitIgnored(const UnicodeString& pattern,
|
1194
|
+
UCalendarDateFields field);
|
1195
|
+
|
1196
|
+
/**
|
1197
|
+
* This is for ICU internal use only. Please do not use.
|
1198
|
+
* Get the locale of this simple date formatter.
|
1199
|
+
* It is used in DateIntervalFormat.
|
1200
|
+
*
|
1201
|
+
* @return locale in this simple date formatter
|
1202
|
+
* @internal ICU 4.0
|
1203
|
+
*/
|
1204
|
+
const Locale& getSmpFmtLocale(void) const;
|
1205
|
+
#endif /* U_HIDE_INTERNAL_API */
|
1206
|
+
|
1207
|
+
private:
|
1208
|
+
friend class DateFormat;
|
1209
|
+
|
1210
|
+
void initializeDefaultCentury(void);
|
1211
|
+
|
1212
|
+
void initializeBooleanAttributes(void);
|
1213
|
+
|
1214
|
+
SimpleDateFormat(); // default constructor not implemented
|
1215
|
+
|
1216
|
+
/**
|
1217
|
+
* Used by the DateFormat factory methods to construct a SimpleDateFormat.
|
1218
|
+
* @param timeStyle the time style.
|
1219
|
+
* @param dateStyle the date style.
|
1220
|
+
* @param locale the given locale.
|
1221
|
+
* @param status Output param set to success/failure code on
|
1222
|
+
* exit.
|
1223
|
+
*/
|
1224
|
+
SimpleDateFormat(EStyle timeStyle, EStyle dateStyle, const Locale& locale, UErrorCode& status);
|
1225
|
+
|
1226
|
+
/**
|
1227
|
+
* Construct a SimpleDateFormat for the given locale. If no resource data
|
1228
|
+
* is available, create an object of last resort, using hard-coded strings.
|
1229
|
+
* This is an internal method, called by DateFormat. It should never fail.
|
1230
|
+
* @param locale the given locale.
|
1231
|
+
* @param status Output param set to success/failure code on
|
1232
|
+
* exit.
|
1233
|
+
*/
|
1234
|
+
SimpleDateFormat(const Locale& locale, UErrorCode& status); // Use default pattern
|
1235
|
+
|
1236
|
+
/**
|
1237
|
+
* Hook called by format(... FieldPosition& ...) and format(...FieldPositionIterator&...)
|
1238
|
+
*/
|
1239
|
+
UnicodeString& _format(Calendar& cal, UnicodeString& appendTo, FieldPositionHandler& handler, UErrorCode& status) const;
|
1240
|
+
|
1241
|
+
/**
|
1242
|
+
* Called by format() to format a single field.
|
1243
|
+
*
|
1244
|
+
* @param appendTo Output parameter to receive result.
|
1245
|
+
* Result is appended to existing contents.
|
1246
|
+
* @param ch The format character we encountered in the pattern.
|
1247
|
+
* @param count Number of characters in the current pattern symbol (e.g.,
|
1248
|
+
* "yyyy" in the pattern would result in a call to this function
|
1249
|
+
* with ch equal to 'y' and count equal to 4)
|
1250
|
+
* @param capitalizationContext Capitalization context for this date format.
|
1251
|
+
* @param fieldNum Zero-based numbering of current field within the overall format.
|
1252
|
+
* @param handler Records information about field positions.
|
1253
|
+
* @param cal Calendar to use
|
1254
|
+
* @param status Receives a status code, which will be U_ZERO_ERROR if the operation
|
1255
|
+
* succeeds.
|
1256
|
+
*/
|
1257
|
+
void subFormat(UnicodeString &appendTo,
|
1258
|
+
UChar ch,
|
1259
|
+
int32_t count,
|
1260
|
+
UDisplayContext capitalizationContext,
|
1261
|
+
int32_t fieldNum,
|
1262
|
+
FieldPositionHandler& handler,
|
1263
|
+
Calendar& cal,
|
1264
|
+
UErrorCode& status) const; // in case of illegal argument
|
1265
|
+
|
1266
|
+
/**
|
1267
|
+
* Used by subFormat() to format a numeric value.
|
1268
|
+
* Appends to toAppendTo a string representation of "value"
|
1269
|
+
* having a number of digits between "minDigits" and
|
1270
|
+
* "maxDigits". Uses the DateFormat's NumberFormat.
|
1271
|
+
*
|
1272
|
+
* @param currentNumberFormat
|
1273
|
+
* @param appendTo Output parameter to receive result.
|
1274
|
+
* Formatted number is appended to existing contents.
|
1275
|
+
* @param value Value to format.
|
1276
|
+
* @param minDigits Minimum number of digits the result should have
|
1277
|
+
* @param maxDigits Maximum number of digits the result should have
|
1278
|
+
*/
|
1279
|
+
void zeroPaddingNumber(NumberFormat *currentNumberFormat,
|
1280
|
+
UnicodeString &appendTo,
|
1281
|
+
int32_t value,
|
1282
|
+
int32_t minDigits,
|
1283
|
+
int32_t maxDigits) const;
|
1284
|
+
|
1285
|
+
/**
|
1286
|
+
* Return true if the given format character, occuring count
|
1287
|
+
* times, represents a numeric field.
|
1288
|
+
*/
|
1289
|
+
static UBool isNumeric(UChar formatChar, int32_t count);
|
1290
|
+
|
1291
|
+
/**
|
1292
|
+
* Returns TRUE if the patternOffset is at the start of a numeric field.
|
1293
|
+
*/
|
1294
|
+
static UBool isAtNumericField(const UnicodeString &pattern, int32_t patternOffset);
|
1295
|
+
|
1296
|
+
/**
|
1297
|
+
* Returns TRUE if the patternOffset is right after a non-numeric field.
|
1298
|
+
*/
|
1299
|
+
static UBool isAfterNonNumericField(const UnicodeString &pattern, int32_t patternOffset);
|
1300
|
+
|
1301
|
+
/**
|
1302
|
+
* initializes fCalendar from parameters. Returns fCalendar as a convenience.
|
1303
|
+
* @param adoptZone Zone to be adopted, or NULL for TimeZone::createDefault().
|
1304
|
+
* @param locale Locale of the calendar
|
1305
|
+
* @param status Error code
|
1306
|
+
* @return the newly constructed fCalendar
|
1307
|
+
*/
|
1308
|
+
Calendar *initializeCalendar(TimeZone* adoptZone, const Locale& locale, UErrorCode& status);
|
1309
|
+
|
1310
|
+
/**
|
1311
|
+
* initializes fSymbols from parameters.
|
1312
|
+
* @param locale Locale of the symbols
|
1313
|
+
* @param calendar Alias to Calendar that will be used.
|
1314
|
+
* @param status Error code
|
1315
|
+
*/
|
1316
|
+
void initializeSymbols(const Locale& locale, Calendar* calendar, UErrorCode& status);
|
1317
|
+
|
1318
|
+
/**
|
1319
|
+
* Called by several of the constructors to load pattern data and formatting symbols
|
1320
|
+
* out of a resource bundle and initialize the locale based on it.
|
1321
|
+
* @param timeStyle The time style, as passed to DateFormat::createDateInstance().
|
1322
|
+
* @param dateStyle The date style, as passed to DateFormat::createTimeInstance().
|
1323
|
+
* @param locale The locale to load the patterns from.
|
1324
|
+
* @param status Filled in with an error code if loading the data from the
|
1325
|
+
* resources fails.
|
1326
|
+
*/
|
1327
|
+
void construct(EStyle timeStyle, EStyle dateStyle, const Locale& locale, UErrorCode& status);
|
1328
|
+
|
1329
|
+
/**
|
1330
|
+
* Called by construct() and the various constructors to set up the SimpleDateFormat's
|
1331
|
+
* Calendar and NumberFormat objects.
|
1332
|
+
* @param locale The locale for which we want a Calendar and a NumberFormat.
|
1333
|
+
* @param status Filled in with an error code if creating either subobject fails.
|
1334
|
+
*/
|
1335
|
+
void initialize(const Locale& locale, UErrorCode& status);
|
1336
|
+
|
1337
|
+
/**
|
1338
|
+
* Private code-size reduction function used by subParse.
|
1339
|
+
* @param text the time text being parsed.
|
1340
|
+
* @param start where to start parsing.
|
1341
|
+
* @param field the date field being parsed.
|
1342
|
+
* @param stringArray the string array to parsed.
|
1343
|
+
* @param stringArrayCount the size of the array.
|
1344
|
+
* @param monthPattern pointer to leap month pattern, or NULL if none.
|
1345
|
+
* @param cal a Calendar set to the date and time to be formatted
|
1346
|
+
* into a date/time string.
|
1347
|
+
* @return the new start position if matching succeeded; a negative number
|
1348
|
+
* indicating matching failure, otherwise.
|
1349
|
+
*/
|
1350
|
+
int32_t matchString(const UnicodeString& text, int32_t start, UCalendarDateFields field,
|
1351
|
+
const UnicodeString* stringArray, int32_t stringArrayCount,
|
1352
|
+
const UnicodeString* monthPattern, Calendar& cal) const;
|
1353
|
+
|
1354
|
+
/**
|
1355
|
+
* Private code-size reduction function used by subParse.
|
1356
|
+
* @param text the time text being parsed.
|
1357
|
+
* @param start where to start parsing.
|
1358
|
+
* @param field the date field being parsed.
|
1359
|
+
* @param stringArray the string array to parsed.
|
1360
|
+
* @param stringArrayCount the size of the array.
|
1361
|
+
* @param cal a Calendar set to the date and time to be formatted
|
1362
|
+
* into a date/time string.
|
1363
|
+
* @return the new start position if matching succeeded; a negative number
|
1364
|
+
* indicating matching failure, otherwise.
|
1365
|
+
*/
|
1366
|
+
int32_t matchQuarterString(const UnicodeString& text, int32_t start, UCalendarDateFields field,
|
1367
|
+
const UnicodeString* stringArray, int32_t stringArrayCount, Calendar& cal) const;
|
1368
|
+
|
1369
|
+
/**
|
1370
|
+
* Private function used by subParse to match literal pattern text.
|
1371
|
+
*
|
1372
|
+
* @param pattern the pattern string
|
1373
|
+
* @param patternOffset the starting offset into the pattern text. On
|
1374
|
+
* outupt will be set the offset of the first non-literal character in the pattern
|
1375
|
+
* @param text the text being parsed
|
1376
|
+
* @param textOffset the starting offset into the text. On output
|
1377
|
+
* will be set to the offset of the character after the match
|
1378
|
+
* @param whitespaceLenient <code>TRUE</code> if whitespace parse is lenient, <code>FALSE</code> otherwise.
|
1379
|
+
* @param partialMatchLenient <code>TRUE</code> if partial match parse is lenient, <code>FALSE</code> otherwise.
|
1380
|
+
* @param oldLeniency <code>TRUE</code> if old leniency control is lenient, <code>FALSE</code> otherwise.
|
1381
|
+
*
|
1382
|
+
* @return <code>TRUE</code> if the literal text could be matched, <code>FALSE</code> otherwise.
|
1383
|
+
*/
|
1384
|
+
static UBool matchLiterals(const UnicodeString &pattern, int32_t &patternOffset,
|
1385
|
+
const UnicodeString &text, int32_t &textOffset,
|
1386
|
+
UBool whitespaceLenient, UBool partialMatchLenient, UBool oldLeniency);
|
1387
|
+
|
1388
|
+
/**
|
1389
|
+
* Private member function that converts the parsed date strings into
|
1390
|
+
* timeFields. Returns -start (for ParsePosition) if failed.
|
1391
|
+
* @param text the time text to be parsed.
|
1392
|
+
* @param start where to start parsing.
|
1393
|
+
* @param ch the pattern character for the date field text to be parsed.
|
1394
|
+
* @param count the count of a pattern character.
|
1395
|
+
* @param obeyCount if true then the count is strictly obeyed.
|
1396
|
+
* @param allowNegative
|
1397
|
+
* @param ambiguousYear If true then the two-digit year == the default start year.
|
1398
|
+
* @param saveHebrewMonth Used to hang onto month until year is known.
|
1399
|
+
* @param cal a Calendar set to the date and time to be formatted
|
1400
|
+
* into a date/time string.
|
1401
|
+
* @param patLoc
|
1402
|
+
* @param numericLeapMonthFormatter If non-null, used to parse numeric leap months.
|
1403
|
+
* @param tzTimeType the type of parsed time zone - standard, daylight or unknown (output).
|
1404
|
+
* This parameter can be NULL if caller does not need the information.
|
1405
|
+
* @return the new start position if matching succeeded; a negative number
|
1406
|
+
* indicating matching failure, otherwise.
|
1407
|
+
*/
|
1408
|
+
int32_t subParse(const UnicodeString& text, int32_t& start, UChar ch, int32_t count,
|
1409
|
+
UBool obeyCount, UBool allowNegative, UBool ambiguousYear[], int32_t& saveHebrewMonth, Calendar& cal,
|
1410
|
+
int32_t patLoc, MessageFormat * numericLeapMonthFormatter, UTimeZoneFormatTimeType *tzTimeType) const;
|
1411
|
+
|
1412
|
+
void parseInt(const UnicodeString& text,
|
1413
|
+
Formattable& number,
|
1414
|
+
ParsePosition& pos,
|
1415
|
+
UBool allowNegative,
|
1416
|
+
NumberFormat *fmt) const;
|
1417
|
+
|
1418
|
+
void parseInt(const UnicodeString& text,
|
1419
|
+
Formattable& number,
|
1420
|
+
int32_t maxDigits,
|
1421
|
+
ParsePosition& pos,
|
1422
|
+
UBool allowNegative,
|
1423
|
+
NumberFormat *fmt) const;
|
1424
|
+
|
1425
|
+
int32_t checkIntSuffix(const UnicodeString& text, int32_t start,
|
1426
|
+
int32_t patLoc, UBool isNegative) const;
|
1427
|
+
|
1428
|
+
/**
|
1429
|
+
* Translate a pattern, mapping each character in the from string to the
|
1430
|
+
* corresponding character in the to string. Return an error if the original
|
1431
|
+
* pattern contains an unmapped character, or if a quote is unmatched.
|
1432
|
+
* Quoted (single quotes only) material is not translated.
|
1433
|
+
* @param originalPattern the original pattern.
|
1434
|
+
* @param translatedPattern Output param to receive the translited pattern.
|
1435
|
+
* @param from the characters to be translited from.
|
1436
|
+
* @param to the characters to be translited to.
|
1437
|
+
* @param status Receives a status code, which will be U_ZERO_ERROR
|
1438
|
+
* if the operation succeeds.
|
1439
|
+
*/
|
1440
|
+
static void translatePattern(const UnicodeString& originalPattern,
|
1441
|
+
UnicodeString& translatedPattern,
|
1442
|
+
const UnicodeString& from,
|
1443
|
+
const UnicodeString& to,
|
1444
|
+
UErrorCode& status);
|
1445
|
+
|
1446
|
+
/**
|
1447
|
+
* Sets the starting date of the 100-year window that dates with 2-digit years
|
1448
|
+
* are considered to fall within.
|
1449
|
+
* @param startDate the start date
|
1450
|
+
* @param status Receives a status code, which will be U_ZERO_ERROR
|
1451
|
+
* if the operation succeeds.
|
1452
|
+
*/
|
1453
|
+
void parseAmbiguousDatesAsAfter(UDate startDate, UErrorCode& status);
|
1454
|
+
|
1455
|
+
/**
|
1456
|
+
* Return the length matched by the given affix, or -1 if none.
|
1457
|
+
* Runs of white space in the affix, match runs of white space in
|
1458
|
+
* the input.
|
1459
|
+
* @param affix pattern string, taken as a literal
|
1460
|
+
* @param input input text
|
1461
|
+
* @param pos offset into input at which to begin matching
|
1462
|
+
* @return length of input that matches, or -1 if match failure
|
1463
|
+
*/
|
1464
|
+
int32_t compareSimpleAffix(const UnicodeString& affix,
|
1465
|
+
const UnicodeString& input,
|
1466
|
+
int32_t pos) const;
|
1467
|
+
|
1468
|
+
/**
|
1469
|
+
* Skip over a run of zero or more Pattern_White_Space characters at
|
1470
|
+
* pos in text.
|
1471
|
+
*/
|
1472
|
+
int32_t skipPatternWhiteSpace(const UnicodeString& text, int32_t pos) const;
|
1473
|
+
|
1474
|
+
/**
|
1475
|
+
* Skip over a run of zero or more isUWhiteSpace() characters at pos
|
1476
|
+
* in text.
|
1477
|
+
*/
|
1478
|
+
int32_t skipUWhiteSpace(const UnicodeString& text, int32_t pos) const;
|
1479
|
+
|
1480
|
+
/**
|
1481
|
+
* Initialize NumberFormat instances used for numbering system overrides.
|
1482
|
+
*/
|
1483
|
+
void initNumberFormatters(const Locale &locale,UErrorCode &status);
|
1484
|
+
|
1485
|
+
/**
|
1486
|
+
* Get the numbering system to be used for a particular field.
|
1487
|
+
*/
|
1488
|
+
NumberFormat * getNumberFormatByIndex(UDateFormatField index) const;
|
1489
|
+
|
1490
|
+
/**
|
1491
|
+
* Parse the given override string and set up structures for number formats
|
1492
|
+
*/
|
1493
|
+
void processOverrideString(const Locale &locale, const UnicodeString &str, int8_t type, UErrorCode &status);
|
1494
|
+
|
1495
|
+
/**
|
1496
|
+
* Used to map pattern characters to Calendar field identifiers.
|
1497
|
+
*/
|
1498
|
+
static const UCalendarDateFields fgPatternIndexToCalendarField[];
|
1499
|
+
|
1500
|
+
/**
|
1501
|
+
* Map index into pattern character string to DateFormat field number
|
1502
|
+
*/
|
1503
|
+
static const UDateFormatField fgPatternIndexToDateFormatField[];
|
1504
|
+
|
1505
|
+
/**
|
1506
|
+
* Lazy TimeZoneFormat instantiation, semantically const
|
1507
|
+
*/
|
1508
|
+
TimeZoneFormat *tzFormat() const;
|
1509
|
+
|
1510
|
+
/**
|
1511
|
+
* Used to map Calendar field to field level.
|
1512
|
+
* The larger the level, the smaller the field unit.
|
1513
|
+
* For example, UCAL_ERA level is 0, UCAL_YEAR level is 10,
|
1514
|
+
* UCAL_MONTH level is 20.
|
1515
|
+
*/
|
1516
|
+
static const int32_t fgCalendarFieldToLevel[];
|
1517
|
+
static const int32_t fgPatternCharToLevel[];
|
1518
|
+
|
1519
|
+
/**
|
1520
|
+
* The formatting pattern for this formatter.
|
1521
|
+
*/
|
1522
|
+
UnicodeString fPattern;
|
1523
|
+
|
1524
|
+
/**
|
1525
|
+
* The numbering system override for dates.
|
1526
|
+
*/
|
1527
|
+
UnicodeString fDateOverride;
|
1528
|
+
|
1529
|
+
/**
|
1530
|
+
* The numbering system override for times.
|
1531
|
+
*/
|
1532
|
+
UnicodeString fTimeOverride;
|
1533
|
+
|
1534
|
+
|
1535
|
+
/**
|
1536
|
+
* The original locale used (for reloading symbols)
|
1537
|
+
*/
|
1538
|
+
Locale fLocale;
|
1539
|
+
|
1540
|
+
/**
|
1541
|
+
* A pointer to an object containing the strings to use in formatting (e.g.,
|
1542
|
+
* month and day names, AM and PM strings, time zone names, etc.)
|
1543
|
+
*/
|
1544
|
+
DateFormatSymbols* fSymbols; // Owned
|
1545
|
+
|
1546
|
+
/**
|
1547
|
+
* The time zone formatter
|
1548
|
+
*/
|
1549
|
+
TimeZoneFormat* fTimeZoneFormat;
|
1550
|
+
|
1551
|
+
/**
|
1552
|
+
* If dates have ambiguous years, we map them into the century starting
|
1553
|
+
* at defaultCenturyStart, which may be any date. If defaultCenturyStart is
|
1554
|
+
* set to SYSTEM_DEFAULT_CENTURY, which it is by default, then the system
|
1555
|
+
* values are used. The instance values defaultCenturyStart and
|
1556
|
+
* defaultCenturyStartYear are only used if explicitly set by the user
|
1557
|
+
* through the API method parseAmbiguousDatesAsAfter().
|
1558
|
+
*/
|
1559
|
+
UDate fDefaultCenturyStart;
|
1560
|
+
|
1561
|
+
/**
|
1562
|
+
* See documentation for defaultCenturyStart.
|
1563
|
+
*/
|
1564
|
+
/*transient*/ int32_t fDefaultCenturyStartYear;
|
1565
|
+
|
1566
|
+
typedef struct NSOverride {
|
1567
|
+
NumberFormat *nf;
|
1568
|
+
int32_t hash;
|
1569
|
+
NSOverride *next;
|
1570
|
+
} NSOverride;
|
1571
|
+
|
1572
|
+
NumberFormat **fNumberFormatters;
|
1573
|
+
|
1574
|
+
NSOverride *fOverrideList;
|
1575
|
+
|
1576
|
+
UBool fHaveDefaultCentury;
|
1577
|
+
|
1578
|
+
BreakIterator* fCapitalizationBrkIter;
|
1579
|
+
};
|
1580
|
+
|
1581
|
+
inline UDate
|
1582
|
+
SimpleDateFormat::get2DigitYearStart(UErrorCode& /*status*/) const
|
1583
|
+
{
|
1584
|
+
return fDefaultCenturyStart;
|
1585
|
+
}
|
1586
|
+
|
1587
|
+
U_NAMESPACE_END
|
1588
|
+
|
1589
|
+
#endif /* #if !UCONFIG_NO_FORMATTING */
|
1590
|
+
|
1591
|
+
#endif // _SMPDTFMT
|
1592
|
+
//eof
|