golden hour
/opt/alt/libicu/usr/include/unicode
⬆️ Go Up
Upload
File/Folder
Size
Actions
alphaindex.h
26.42 KB
Del
OK
appendable.h
8.43 KB
Del
OK
basictz.h
8.84 KB
Del
OK
brkiter.h
27.53 KB
Del
OK
bytestream.h
9.54 KB
Del
OK
bytestrie.h
19.26 KB
Del
OK
bytestriebuilder.h
7.02 KB
Del
OK
calendar.h
105.06 KB
Del
OK
caniter.h
7.37 KB
Del
OK
casemap.h
25.26 KB
Del
OK
char16ptr.h
7.16 KB
Del
OK
chariter.h
24 KB
Del
OK
choicfmt.h
23.85 KB
Del
OK
coleitr.h
13.7 KB
Del
OK
coll.h
55.59 KB
Del
OK
compactdecimalformat.h
6.81 KB
Del
OK
curramt.h
3.69 KB
Del
OK
currpinf.h
7.24 KB
Del
OK
currunit.h
3.52 KB
Del
OK
datefmt.h
40.37 KB
Del
OK
dbbi.h
1.11 KB
Del
OK
dcfmtsym.h
20.1 KB
Del
OK
decimfmt.h
86.4 KB
Del
OK
docmain.h
6.72 KB
Del
OK
dtfmtsym.h
37.64 KB
Del
OK
dtintrv.h
3.76 KB
Del
OK
dtitvfmt.h
42.87 KB
Del
OK
dtitvinf.h
18.46 KB
Del
OK
dtptngen.h
25.03 KB
Del
OK
dtrule.h
8.62 KB
Del
OK
edits.h
20.67 KB
Del
OK
enumset.h
2.08 KB
Del
OK
errorcode.h
4.78 KB
Del
OK
fieldpos.h
8.63 KB
Del
OK
filteredbrk.h
5.24 KB
Del
OK
fmtable.h
24.36 KB
Del
OK
format.h
12.44 KB
Del
OK
fpositer.h
2.98 KB
Del
OK
gender.h
3.27 KB
Del
OK
gregocal.h
31.57 KB
Del
OK
icudataver.h
1.03 KB
Del
OK
icuplug.h
11.88 KB
Del
OK
idna.h
12.63 KB
Del
OK
listformatter.h
6.18 KB
Del
OK
localpointer.h
16.88 KB
Del
OK
locdspnm.h
7.05 KB
Del
OK
locid.h
44.92 KB
Del
OK
measfmt.h
12.01 KB
Del
OK
measunit.h
38.5 KB
Del
OK
measure.h
4.26 KB
Del
OK
messagepattern.h
33.65 KB
Del
OK
msgfmt.h
43.36 KB
Del
OK
normalizer2.h
33.97 KB
Del
OK
normlzr.h
30.74 KB
Del
OK
nounit.h
2.63 KB
Del
OK
numberformatter.h
87.07 KB
Del
OK
numberrangeformatter.h
28.74 KB
Del
OK
numfmt.h
49.14 KB
Del
OK
numsys.h
6.73 KB
Del
OK
parseerr.h
3.08 KB
Del
OK
parsepos.h
5.45 KB
Del
OK
platform.h
27.1 KB
Del
OK
plurfmt.h
25.18 KB
Del
OK
plurrule.h
17.42 KB
Del
OK
ptypes.h
3.49 KB
Del
OK
putil.h
6.33 KB
Del
OK
rbbi.h
26.41 KB
Del
OK
rbnf.h
49.79 KB
Del
OK
rbtz.h
15.47 KB
Del
OK
regex.h
84.91 KB
Del
OK
region.h
9.12 KB
Del
OK
reldatefmt.h
14.46 KB
Del
OK
rep.h
9.5 KB
Del
OK
resbund.h
18.01 KB
Del
OK
schriter.h
6.26 KB
Del
OK
scientificnumberformatter.h
6.32 KB
Del
OK
search.h
22.21 KB
Del
OK
selfmt.h
14.24 KB
Del
OK
simpleformatter.h
11.43 KB
Del
OK
simpletz.h
45.3 KB
Del
OK
smpdtfmt.h
70.74 KB
Del
OK
sortkey.h
11.12 KB
Del
OK
std_string.h
1015 B
Del
OK
strenum.h
10.04 KB
Del
OK
stringoptions.h
5.79 KB
Del
OK
stringpiece.h
6.46 KB
Del
OK
stringtriebuilder.h
15.27 KB
Del
OK
stsearch.h
21.29 KB
Del
OK
symtable.h
4.21 KB
Del
OK
tblcoll.h
36.4 KB
Del
OK
timezone.h
40.88 KB
Del
OK
tmunit.h
3.29 KB
Del
OK
tmutamt.h
4.8 KB
Del
OK
tmutfmt.h
7.79 KB
Del
OK
translit.h
65.76 KB
Del
OK
tzfmt.h
42.82 KB
Del
OK
tznames.h
16.79 KB
Del
OK
tzrule.h
35.32 KB
Del
OK
tztrans.h
6.07 KB
Del
OK
ubidi.h
89.56 KB
Del
OK
ubiditransform.h
12.65 KB
Del
OK
ubrk.h
23.97 KB
Del
OK
ucal.h
55.2 KB
Del
OK
ucasemap.h
15.18 KB
Del
OK
ucat.h
5.36 KB
Del
OK
uchar.h
139.96 KB
Del
OK
ucharstrie.h
21.06 KB
Del
OK
ucharstriebuilder.h
7.14 KB
Del
OK
uchriter.h
13.14 KB
Del
OK
uclean.h
11.21 KB
Del
OK
ucnv.h
83.09 KB
Del
OK
ucnv_cb.h
6.59 KB
Del
OK
ucnv_err.h
20.99 KB
Del
OK
ucnvsel.h
6.14 KB
Del
OK
ucol.h
61.39 KB
Del
OK
ucoleitr.h
9.46 KB
Del
OK
uconfig.h
11.67 KB
Del
OK
ucpmap.h
5.58 KB
Del
OK
ucptrie.h
22.29 KB
Del
OK
ucsdet.h
14.67 KB
Del
OK
ucurr.h
15.57 KB
Del
OK
udat.h
60.13 KB
Del
OK
udata.h
15.53 KB
Del
OK
udateintervalformat.h
6.79 KB
Del
OK
udatpg.h
26.04 KB
Del
OK
udisplaycontext.h
5.89 KB
Del
OK
uenum.h
7.78 KB
Del
OK
ufieldpositer.h
4.36 KB
Del
OK
uformattable.h
10.94 KB
Del
OK
ugender.h
2 KB
Del
OK
uidna.h
33.37 KB
Del
OK
uiter.h
22.77 KB
Del
OK
uldnames.h
10.45 KB
Del
OK
ulistformatter.h
5.03 KB
Del
OK
uloc.h
50.75 KB
Del
OK
ulocdata.h
11.26 KB
Del
OK
umachine.h
13.19 KB
Del
OK
umisc.h
1.33 KB
Del
OK
umsg.h
24.23 KB
Del
OK
umutablecptrie.h
8.28 KB
Del
OK
unifilt.h
3.63 KB
Del
OK
unifunct.h
3.98 KB
Del
OK
unimatch.h
6.04 KB
Del
OK
unirepl.h
3.32 KB
Del
OK
uniset.h
64.25 KB
Del
OK
unistr.h
174.4 KB
Del
OK
unorm.h
20.45 KB
Del
OK
unorm2.h
24.66 KB
Del
OK
unum.h
53.38 KB
Del
OK
unumberformatter.h
23.76 KB
Del
OK
unumsys.h
7.14 KB
Del
OK
uobject.h
10.7 KB
Del
OK
upluralrules.h
6.72 KB
Del
OK
uregex.h
72.05 KB
Del
OK
uregion.h
9.84 KB
Del
OK
ureldatefmt.h
12.22 KB
Del
OK
urename.h
127.73 KB
Del
OK
urep.h
5.38 KB
Del
OK
ures.h
36.53 KB
Del
OK
uscript.h
26.52 KB
Del
OK
usearch.h
38.12 KB
Del
OK
uset.h
40 KB
Del
OK
usetiter.h
9.49 KB
Del
OK
ushape.h
18 KB
Del
OK
uspoof.h
66.03 KB
Del
OK
usprep.h
8.14 KB
Del
OK
ustdio.h
38.54 KB
Del
OK
ustream.h
1.8 KB
Del
OK
ustring.h
72.47 KB
Del
OK
ustringtrie.h
3.15 KB
Del
OK
utext.h
58.11 KB
Del
OK
utf.h
7.86 KB
Del
OK
utf16.h
22.33 KB
Del
OK
utf32.h
763 B
Del
OK
utf8.h
30.01 KB
Del
OK
utf_old.h
43.78 KB
Del
OK
utmscale.h
13.78 KB
Del
OK
utrace.h
13.89 KB
Del
OK
utrans.h
25.54 KB
Del
OK
utypes.h
30.48 KB
Del
OK
uvernum.h
6.06 KB
Del
OK
uversion.h
6.7 KB
Del
OK
vtzone.h
20.17 KB
Del
OK
Edit: tmutfmt.h
// © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html /* ******************************************************************************* * Copyright (C) 2008-2014, Google, International Business Machines Corporation * and others. All Rights Reserved. ******************************************************************************* */ #ifndef __TMUTFMT_H__ #define __TMUTFMT_H__ #include "unicode/utypes.h" /** * \file * \brief C++ API: Format and parse duration in single time unit */ #if !UCONFIG_NO_FORMATTING #ifndef U_HIDE_DEPRECATED_API #include "unicode/unistr.h" #include "unicode/tmunit.h" #include "unicode/tmutamt.h" #include "unicode/measfmt.h" #include "unicode/numfmt.h" #include "unicode/plurrule.h" /** * Constants for various styles. * There are 2 styles: full name and abbreviated name. * For example, for English, the full name for hour duration is "3 hours", * and the abbreviated name is "3 hrs". * @deprecated ICU 53 Use MeasureFormat and UMeasureFormatWidth instead. */ enum UTimeUnitFormatStyle { /** @deprecated ICU 53 */ UTMUTFMT_FULL_STYLE, /** @deprecated ICU 53 */ UTMUTFMT_ABBREVIATED_STYLE, /** @deprecated ICU 53 */ UTMUTFMT_FORMAT_STYLE_COUNT }; typedef enum UTimeUnitFormatStyle UTimeUnitFormatStyle; /**< @deprecated ICU 53 */ U_NAMESPACE_BEGIN class Hashtable; class UVector; struct TimeUnitFormatReadSink; /** * Format or parse a TimeUnitAmount, using plural rules for the units where available. * * <P> * Code Sample: * <pre> * // create time unit amount instance - a combination of Number and time unit * UErrorCode status = U_ZERO_ERROR; * TimeUnitAmount* source = new TimeUnitAmount(2, TimeUnit::UTIMEUNIT_YEAR, status); * // create time unit format instance * TimeUnitFormat* format = new TimeUnitFormat(Locale("en"), status); * // format a time unit amount * UnicodeString formatted; * Formattable formattable; * if (U_SUCCESS(status)) { * formattable.adoptObject(source); * formatted = ((Format*)format)->format(formattable, formatted, status); * Formattable result; * ((Format*)format)->parseObject(formatted, result, status); * if (U_SUCCESS(status)) { * assert (result == formattable); * } * } * </pre> * * <P> * @see TimeUnitAmount * @see TimeUnitFormat * @deprecated ICU 53 Use the MeasureFormat class instead. */ class U_I18N_API TimeUnitFormat: public MeasureFormat { public: /** * Create TimeUnitFormat with default locale, and full name style. * Use setLocale and/or setFormat to modify. * @deprecated ICU 53 */ TimeUnitFormat(UErrorCode& status); /** * Create TimeUnitFormat given locale, and full name style. * @deprecated ICU 53 */ TimeUnitFormat(const Locale& locale, UErrorCode& status); /** * Create TimeUnitFormat given locale and style. * @deprecated ICU 53 */ TimeUnitFormat(const Locale& locale, UTimeUnitFormatStyle style, UErrorCode& status); /** * Copy constructor. * @deprecated ICU 53 */ TimeUnitFormat(const TimeUnitFormat&); /** * deconstructor * @deprecated ICU 53 */ virtual ~TimeUnitFormat(); /** * Clone this Format object polymorphically. The caller owns the result and * should delete it when done. * @return A copy of the object. * @deprecated ICU 53 */ virtual Format* clone(void) const; /** * Assignment operator * @deprecated ICU 53 */ TimeUnitFormat& operator=(const TimeUnitFormat& other); /** * Return true if the given Format objects are not semantically equal. * Objects of different subclasses are considered unequal. * @param other the object to be compared with. * @return true if the given Format objects are not semantically equal. * @deprecated ICU 53 */ UBool operator!=(const Format& other) const; /** * Set the locale used for formatting or parsing. * @param locale the locale to be set * @param status output param set to success/failure code on exit * @deprecated ICU 53 */ void setLocale(const Locale& locale, UErrorCode& status); /** * Set the number format used for formatting or parsing. * @param format the number formatter to be set * @param status output param set to success/failure code on exit * @deprecated ICU 53 */ void setNumberFormat(const NumberFormat& format, UErrorCode& status); /** * Parse a TimeUnitAmount. * @see Format#parseObject(const UnicodeString&, Formattable&, ParsePosition&) const; * @deprecated ICU 53 */ virtual void parseObject(const UnicodeString& source, Formattable& result, ParsePosition& pos) const; /** * Return the class ID for this class. This is useful only for comparing to * a return value from getDynamicClassID(). For example: * <pre> * . Base* polymorphic_pointer = createPolymorphicObject(); * . if (polymorphic_pointer->getDynamicClassID() == * . erived::getStaticClassID()) ... * </pre> * @return The class ID for all objects of this class. * @deprecated ICU 53 */ static UClassID U_EXPORT2 getStaticClassID(void); /** * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This * method is to implement a simple version of RTTI, since not all C++ * compilers support genuine RTTI. Polymorphic operator==() and clone() * methods call this method. * * @return The class ID for this object. All objects of a * given class have the same class ID. Objects of * other classes have different class IDs. * @deprecated ICU 53 */ virtual UClassID getDynamicClassID(void) const; private: Hashtable* fTimeUnitToCountToPatterns[TimeUnit::UTIMEUNIT_FIELD_COUNT]; UTimeUnitFormatStyle fStyle; void create(UTimeUnitFormatStyle style, UErrorCode& status); // it might actually be simpler to make them Decimal Formats later. // initialize all private data members void setup(UErrorCode& status); // initialize data member without fill in data for fTimeUnitToCountToPattern void initDataMembers(UErrorCode& status); // initialize fTimeUnitToCountToPatterns from current locale's resource. void readFromCurrentLocale(UTimeUnitFormatStyle style, const char* key, const UVector& pluralCounts, UErrorCode& status); // check completeness of fTimeUnitToCountToPatterns against all time units, // and all plural rules, fill in fallback as necessary. void checkConsistency(UTimeUnitFormatStyle style, const char* key, UErrorCode& status); // fill in fTimeUnitToCountToPatterns from locale fall-back chain void searchInLocaleChain(UTimeUnitFormatStyle style, const char* key, const char* localeName, TimeUnit::UTimeUnitFields field, const UnicodeString&, const char*, Hashtable*, UErrorCode&); // initialize hash table Hashtable* initHash(UErrorCode& status); // delete hash table void deleteHash(Hashtable* htable); // copy hash table void copyHash(const Hashtable* source, Hashtable* target, UErrorCode& status); // get time unit name, such as "year", from time unit field enum, such as // UTIMEUNIT_YEAR. static const char* getTimeUnitName(TimeUnit::UTimeUnitFields field, UErrorCode& status); friend struct TimeUnitFormatReadSink; }; inline UBool TimeUnitFormat::operator!=(const Format& other) const { return !operator==(other); } U_NAMESPACE_END #endif /* U_HIDE_DEPRECATED_API */ #endif /* #if !UCONFIG_NO_FORMATTING */ #endif // __TMUTFMT_H__ //eof
Save