Home
last modified time | relevance | path

Searched refs:TimeUnit (Results 1 – 25 of 82) sorted by relevance

1234

/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/impl/duration/
DTimeUnit.java18 public final class TimeUnit { class
26 private TimeUnit(String name, int ordinal) { in TimeUnit() method in TimeUnit
37 public static final TimeUnit YEAR = new TimeUnit("year", 0);
40 public static final TimeUnit MONTH = new TimeUnit("month", 1);
43 public static final TimeUnit WEEK = new TimeUnit("week", 2);
46 public static final TimeUnit DAY = new TimeUnit("day", 3);
49 public static final TimeUnit HOUR = new TimeUnit("hour", 4);
52 public static final TimeUnit MINUTE = new TimeUnit("minute", 5);
55 public static final TimeUnit SECOND = new TimeUnit("second", 6);
58 public static final TimeUnit MILLISECOND = new TimeUnit("millisecond", 7);
[all …]
DTimeUnitConstants.java19 public static final TimeUnit YEAR = TimeUnit.YEAR;
22 public static final TimeUnit MONTH = TimeUnit.MONTH;
25 public static final TimeUnit WEEK = TimeUnit.WEEK;
28 public static final TimeUnit DAY = TimeUnit.DAY;
31 public static final TimeUnit HOUR = TimeUnit.HOUR;
34 public static final TimeUnit MINUTE = TimeUnit.MINUTE;
37 public static final TimeUnit SECOND = TimeUnit.SECOND;
40 public static final TimeUnit MILLISECOND = TimeUnit.MILLISECOND;
DBasicPeriodBuilderFactory.java34 static long approximateDurationOf(TimeUnit unit) { in approximateDurationOf()
35 return TimeUnit.approxDurations[unit.ordinal]; in approximateDurationOf()
41 TimeUnit maxUnit = TimeUnit.YEAR;
42 TimeUnit minUnit = TimeUnit.MILLISECOND;
59 result.maxUnit = TimeUnit.YEAR; in setUnits()
60 result.minUnit = TimeUnit.MILLISECOND; in setUnits()
63 for (int i = 0; i < TimeUnit.units.length; ++i) { in setUnits()
66 result.maxUnit = TimeUnit.units[i]; in setUnits()
75 result.minUnit = TimeUnit.units[lastUnit]; in setUnits()
86 return (short)(uset & ~(1 << TimeUnit.MILLISECOND.ordinal)); in effectiveSet()
[all …]
DPeriod.java43 public static Period at(float count, TimeUnit unit) { in at()
55 public static Period moreThan(float count, TimeUnit unit) { in moreThan()
67 public static Period lessThan(float count, TimeUnit unit) { in lessThan()
83 public Period and(float count, TimeUnit unit) { in and()
94 public Period omit(TimeUnit unit) { in omit()
183 public boolean isSet(TimeUnit unit) { in isSet()
193 public float getCount(TimeUnit unit) { in getCount()
297 private Period(int limit, boolean future, float count, TimeUnit unit) { in Period()
300 this.counts = new int[TimeUnit.units.length]; in Period()
316 private Period setTimeUnitValue(TimeUnit unit, float value) { in setTimeUnitValue()
[all …]
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/duration/
DTimeUnit.java16 public final class TimeUnit { class
24 private TimeUnit(String name, int ordinal) { in TimeUnit() method in TimeUnit
35 public static final TimeUnit YEAR = new TimeUnit("year", 0);
38 public static final TimeUnit MONTH = new TimeUnit("month", 1);
41 public static final TimeUnit WEEK = new TimeUnit("week", 2);
44 public static final TimeUnit DAY = new TimeUnit("day", 3);
47 public static final TimeUnit HOUR = new TimeUnit("hour", 4);
50 public static final TimeUnit MINUTE = new TimeUnit("minute", 5);
53 public static final TimeUnit SECOND = new TimeUnit("second", 6);
56 public static final TimeUnit MILLISECOND = new TimeUnit("millisecond", 7);
[all …]
DTimeUnitConstants.java17 public static final TimeUnit YEAR = TimeUnit.YEAR;
20 public static final TimeUnit MONTH = TimeUnit.MONTH;
23 public static final TimeUnit WEEK = TimeUnit.WEEK;
26 public static final TimeUnit DAY = TimeUnit.DAY;
29 public static final TimeUnit HOUR = TimeUnit.HOUR;
32 public static final TimeUnit MINUTE = TimeUnit.MINUTE;
35 public static final TimeUnit SECOND = TimeUnit.SECOND;
38 public static final TimeUnit MILLISECOND = TimeUnit.MILLISECOND;
DBasicPeriodBuilderFactory.java33 static long approximateDurationOf(TimeUnit unit) { in approximateDurationOf()
34 return TimeUnit.approxDurations[unit.ordinal]; in approximateDurationOf()
40 TimeUnit maxUnit = TimeUnit.YEAR;
41 TimeUnit minUnit = TimeUnit.MILLISECOND;
58 result.maxUnit = TimeUnit.YEAR; in setUnits()
59 result.minUnit = TimeUnit.MILLISECOND; in setUnits()
62 for (int i = 0; i < TimeUnit.units.length; ++i) { in setUnits()
65 result.maxUnit = TimeUnit.units[i]; in setUnits()
74 result.minUnit = TimeUnit.units[lastUnit]; in setUnits()
85 return (short)(uset & ~(1 << TimeUnit.MILLISECOND.ordinal)); in effectiveSet()
[all …]
DPeriod.java41 public static Period at(float count, TimeUnit unit) { in at()
53 public static Period moreThan(float count, TimeUnit unit) { in moreThan()
65 public static Period lessThan(float count, TimeUnit unit) { in lessThan()
81 public Period and(float count, TimeUnit unit) { in and()
92 public Period omit(TimeUnit unit) { in omit()
181 public boolean isSet(TimeUnit unit) { in isSet()
191 public float getCount(TimeUnit unit) { in getCount()
295 private Period(int limit, boolean future, float count, TimeUnit unit) { in Period()
298 this.counts = new int[TimeUnit.units.length]; in Period()
314 private Period setTimeUnitValue(TimeUnit unit, float value) { in setTimeUnitValue()
[all …]
/third_party/skia/third_party/externals/icu/source/i18n/
Dtmunit.cpp17 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TimeUnit) in UOBJECT_DEFINE_RTTI_IMPLEMENTATION() argument
58 TimeUnit* U_EXPORT2 in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
59 TimeUnit::createInstance(TimeUnit::UTimeUnitFields timeUnitField, in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
68 return new TimeUnit(timeUnitField); in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
72 TimeUnit::TimeUnit(TimeUnit::UTimeUnitFields timeUnitField) { in TimeUnit() function in TimeUnit
101 TimeUnit::TimeUnit(const TimeUnit& other) in TimeUnit() function in TimeUnit
105 TimeUnit*
106 TimeUnit::clone() const { in clone()
107 return new TimeUnit(*this); in clone()
110 TimeUnit&
[all …]
Dtmutfmt.cpp114 for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR; in TimeUnitFormat()
115 i < TimeUnit::UTIMEUNIT_FIELD_COUNT; in TimeUnitFormat()
116 i = (TimeUnit::UTimeUnitFields)(i+1)) { in TimeUnitFormat()
130 for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR; in ~TimeUnitFormat()
131 i < TimeUnit::UTIMEUNIT_FIELD_COUNT; in ~TimeUnitFormat()
132 i = (TimeUnit::UTimeUnitFields)(i+1)) { in ~TimeUnitFormat()
151 for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR; in operator =()
152 i < TimeUnit::UTIMEUNIT_FIELD_COUNT; in operator =()
153 i = (TimeUnit::UTimeUnitFields)(i+1)) { in operator =()
157 for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR; in operator =()
[all …]
/third_party/icu/icu4c/source/i18n/
Dtmunit.cpp17 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TimeUnit) in UOBJECT_DEFINE_RTTI_IMPLEMENTATION() argument
58 TimeUnit* U_EXPORT2 in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
59 TimeUnit::createInstance(TimeUnit::UTimeUnitFields timeUnitField, in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
68 return new TimeUnit(timeUnitField); in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
72 TimeUnit::TimeUnit(TimeUnit::UTimeUnitFields timeUnitField) { in TimeUnit() function in TimeUnit
101 TimeUnit::TimeUnit(const TimeUnit& other) in TimeUnit() function in TimeUnit
105 TimeUnit*
106 TimeUnit::clone() const { in clone()
107 return new TimeUnit(*this); in clone()
110 TimeUnit&
[all …]
Dtmutfmt.cpp114 for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR; in TimeUnitFormat()
115 i < TimeUnit::UTIMEUNIT_FIELD_COUNT; in TimeUnitFormat()
116 i = (TimeUnit::UTimeUnitFields)(i+1)) { in TimeUnitFormat()
130 for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR; in ~TimeUnitFormat()
131 i < TimeUnit::UTIMEUNIT_FIELD_COUNT; in ~TimeUnitFormat()
132 i = (TimeUnit::UTimeUnitFields)(i+1)) { in ~TimeUnitFormat()
151 for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR; in operator =()
152 i < TimeUnit::UTIMEUNIT_FIELD_COUNT; in operator =()
153 i = (TimeUnit::UTimeUnitFields)(i+1)) { in operator =()
157 for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR; in operator =()
[all …]
/third_party/node/deps/icu-small/source/i18n/
Dtmunit.cpp17 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TimeUnit) in UOBJECT_DEFINE_RTTI_IMPLEMENTATION() argument
58 TimeUnit* U_EXPORT2 in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
59 TimeUnit::createInstance(TimeUnit::UTimeUnitFields timeUnitField, in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
68 return new TimeUnit(timeUnitField); in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
72 TimeUnit::TimeUnit(TimeUnit::UTimeUnitFields timeUnitField) { in TimeUnit() function in TimeUnit
101 TimeUnit::TimeUnit(const TimeUnit& other) in TimeUnit() function in TimeUnit
105 TimeUnit*
106 TimeUnit::clone() const { in clone()
107 return new TimeUnit(*this); in clone()
110 TimeUnit&
[all …]
Dtmutfmt.cpp114 for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR; in TimeUnitFormat()
115 i < TimeUnit::UTIMEUNIT_FIELD_COUNT; in TimeUnitFormat()
116 i = (TimeUnit::UTimeUnitFields)(i+1)) { in TimeUnitFormat()
130 for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR; in ~TimeUnitFormat()
131 i < TimeUnit::UTIMEUNIT_FIELD_COUNT; in ~TimeUnitFormat()
132 i = (TimeUnit::UTimeUnitFields)(i+1)) { in ~TimeUnitFormat()
151 for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR; in operator =()
152 i < TimeUnit::UTIMEUNIT_FIELD_COUNT; in operator =()
153 i = (TimeUnit::UTimeUnitFields)(i+1)) { in operator =()
157 for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR; in operator =()
[all …]
Dtmutamt.cpp20 TimeUnit::UTimeUnitFields timeUnitField, in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
22 : Measure(number, TimeUnit::createInstance(timeUnitField, status), status) { in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
27 TimeUnit::UTimeUnitFields timeUnitField, in TimeUnitAmount()
30 TimeUnit::createInstance(timeUnitField, status), in TimeUnitAmount()
64 const TimeUnit&
66 return static_cast<const TimeUnit&>(getUnit()); in getTimeUnit()
70 TimeUnit::UTimeUnitFields
/third_party/typescript/tests/baselines/reference/
DexternalModuleReferenceDoubleUnderscore1.types8 export import TimeUnit = basics.TimeUnit;
9 >TimeUnit : typeof basics.TimeUnit
11 >TimeUnit : basics.TimeUnit
17 export enum TimeUnit {
18 >TimeUnit : TimeUnit
21 >Second : TimeUnit.Second
25 >Minute : TimeUnit.Minute
29 >Hour : TimeUnit.Hour
33 >Day : TimeUnit.Day
37 >Week : TimeUnit.Week
[all …]
DexternalModuleReferenceDoubleUnderscore1.symbols8 export import TimeUnit = basics.TimeUnit;
9 >TimeUnit : Symbol(TimeUnit, Decl(externalModuleReferenceDoubleUnderscore1.ts, 1, 57))
11 >TimeUnit : Symbol(basics.TimeUnit, Decl(externalModuleReferenceDoubleUnderscore1.ts, 5, 44))
17 export enum TimeUnit {
18 >TimeUnit : Symbol(TimeUnit, Decl(externalModuleReferenceDoubleUnderscore1.ts, 5, 44))
21 >Second : Symbol(TimeUnit.Second, Decl(externalModuleReferenceDoubleUnderscore1.ts, 6, 26))
24 >Minute : Symbol(TimeUnit.Minute, Decl(externalModuleReferenceDoubleUnderscore1.ts, 7, 19))
27 >Hour : Symbol(TimeUnit.Hour, Decl(externalModuleReferenceDoubleUnderscore1.ts, 8, 19))
30 >Day : Symbol(TimeUnit.Day, Decl(externalModuleReferenceDoubleUnderscore1.ts, 9, 17))
33 >Week : Symbol(TimeUnit.Week, Decl(externalModuleReferenceDoubleUnderscore1.ts, 10, 16))
[all …]
/third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/duration/
DPeriodTest.java20 import com.ibm.icu.impl.duration.TimeUnit;
26 Period p = Period.at(0, TimeUnit.YEAR); in testIsSet()
28 assertTrue(null, p.isSet(TimeUnit.YEAR)); in testIsSet()
29 assertFalse(null, p.isSet(TimeUnit.MONTH)); in testIsSet()
30 assertEquals(null, 0f, p.getCount(TimeUnit.YEAR), .1f); in testIsSet()
31 p = p.omit(TimeUnit.YEAR); in testIsSet()
32 assertFalse(null, p.isSet(TimeUnit.YEAR)); in testIsSet()
37 Period p = Period.moreThan(1, TimeUnit.YEAR); in testMoreLessThan()
50 p = Period.lessThan(1, TimeUnit.YEAR); in testMoreLessThan()
54 p = Period.at(1, TimeUnit.YEAR); in testMoreLessThan()
[all …]
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/duration/
DPeriodTest.java21 import ohos.global.icu.impl.duration.TimeUnit;
29 Period p = Period.at(0, TimeUnit.YEAR); in testIsSet()
31 assertTrue(null, p.isSet(TimeUnit.YEAR)); in testIsSet()
32 assertFalse(null, p.isSet(TimeUnit.MONTH)); in testIsSet()
33 assertEquals(null, 0f, p.getCount(TimeUnit.YEAR), .1f); in testIsSet()
34 p = p.omit(TimeUnit.YEAR); in testIsSet()
35 assertFalse(null, p.isSet(TimeUnit.YEAR)); in testIsSet()
40 Period p = Period.moreThan(1, TimeUnit.YEAR); in testMoreLessThan()
53 p = Period.lessThan(1, TimeUnit.YEAR); in testMoreLessThan()
57 p = Period.at(1, TimeUnit.YEAR); in testMoreLessThan()
[all …]
/third_party/icu/icu4c/source/test/intltest/
Dtufmtts.cpp121 for (TimeUnit::UTimeUnitFields j = TimeUnit::UTIMEUNIT_YEAR; in testBasic()
122 j < TimeUnit::UTIMEUNIT_FIELD_COUNT; in testBasic()
123 j = (TimeUnit::UTimeUnitFields)(j+1)) { in testBasic()
171 TimeUnit* tmunit = TimeUnit::createInstance(TimeUnit::UTIMEUNIT_YEAR, status); in testAPI()
174 TimeUnit* another = tmunit->clone(); in testAPI()
175 TimeUnit third(*tmunit); in testAPI()
176 TimeUnit fourth = third; in testAPI()
181 TimeUnit* tmunit_m = TimeUnit::createInstance(TimeUnit::UTIMEUNIT_MONTH, status); in testAPI()
184 TimeUnit::UTimeUnitFields field = tmunit_m->getTimeUnitField(); in testAPI()
185 assertTrue("field of month time unit is month", (field == TimeUnit::UTIMEUNIT_MONTH)); in testAPI()
[all …]
/third_party/skia/third_party/externals/icu/source/i18n/unicode/
Dtmunit.h35 class U_I18N_API TimeUnit: public MeasureUnit {
68 static TimeUnit* U_EXPORT2 createInstance(UTimeUnitFields timeUnitField,
76 virtual TimeUnit* clone() const;
82 TimeUnit(const TimeUnit& other);
88 TimeUnit& operator=(const TimeUnit& other);
120 virtual ~TimeUnit();
129 TimeUnit(UTimeUnitFields timeUnitField);
/third_party/icu/icu4c/source/i18n/unicode/
Dtmunit.h35 class U_I18N_API TimeUnit: public MeasureUnit {
68 static TimeUnit* U_EXPORT2 createInstance(UTimeUnitFields timeUnitField,
76 virtual TimeUnit* clone() const override;
82 TimeUnit(const TimeUnit& other);
88 TimeUnit& operator=(const TimeUnit& other);
120 virtual ~TimeUnit();
129 TimeUnit(UTimeUnitFields timeUnitField);
/third_party/node/deps/icu-small/source/i18n/unicode/
Dtmunit.h35 class U_I18N_API TimeUnit: public MeasureUnit {
68 static TimeUnit* U_EXPORT2 createInstance(UTimeUnitFields timeUnitField,
76 virtual TimeUnit* clone() const override;
82 TimeUnit(const TimeUnit& other);
88 TimeUnit& operator=(const TimeUnit& other);
120 virtual ~TimeUnit();
129 TimeUnit(UTimeUnitFields timeUnitField);
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/text/
DTimeUnitFormat.java27 import ohos.global.icu.util.TimeUnit;
95 private transient Map<TimeUnit, Map<String, Object[]>> timeUnitToCountToPatterns;
253 TimeUnit resultTimeUnit = null; in parseObject()
261 for (TimeUnit timeUnit : timeUnitToCountToPatterns.keySet()) { in parseObject()
356 Map<TimeUnit, Map<String, Object[]>> timeUnitToCountToPatterns;
362 TimeUnitFormatSetupSink(Map<TimeUnit, Map<String, Object[]>> timeUnitToCountToPatterns, in TimeUnitFormatSetupSink() argument
383 TimeUnit timeUnit = null; in put()
386 timeUnit = TimeUnit.YEAR; in put()
388 timeUnit = TimeUnit.MONTH; in put()
390 timeUnit = TimeUnit.DAY; in put()
[all …]
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DTimeUnitFormat.java26 import com.ibm.icu.util.TimeUnit;
93 private transient Map<TimeUnit, Map<String, Object[]>> timeUnitToCountToPatterns;
251 TimeUnit resultTimeUnit = null; in parseObject()
259 for (TimeUnit timeUnit : timeUnitToCountToPatterns.keySet()) { in parseObject()
354 Map<TimeUnit, Map<String, Object[]>> timeUnitToCountToPatterns;
360 TimeUnitFormatSetupSink(Map<TimeUnit, Map<String, Object[]>> timeUnitToCountToPatterns, in TimeUnitFormatSetupSink() argument
381 TimeUnit timeUnit = null; in put()
384 timeUnit = TimeUnit.YEAR; in put()
386 timeUnit = TimeUnit.MONTH; in put()
388 timeUnit = TimeUnit.DAY; in put()
[all …]

1234