ICU 64.2  64.2
Public Types | Public Member Functions | Static Public Member Functions
icu::TimeUnit Class Reference

Measurement unit for time units. More...

#include <tmunit.h>

Inheritance diagram for icu::TimeUnit:
icu::MeasureUnit icu::UObject icu::UMemory

Public Types

enum  UTimeUnitFields {
  UTIMEUNIT_YEAR, UTIMEUNIT_MONTH, UTIMEUNIT_DAY, UTIMEUNIT_WEEK,
  UTIMEUNIT_HOUR, UTIMEUNIT_MINUTE, UTIMEUNIT_SECOND, UTIMEUNIT_FIELD_COUNT
}
 Constants for all the time units we supported. More...
 

Public Member Functions

virtual UObjectclone () const
 Override clone. More...
 
 TimeUnit (const TimeUnit &other)
 Copy operator. More...
 
TimeUnitoperator= (const TimeUnit &other)
 Assignment operator. More...
 
virtual UClassID getDynamicClassID () const
 Returns a unique class ID for this object POLYMORPHICALLY. More...
 
UTimeUnitFields getTimeUnitField () const
 Get time unit field. More...
 
virtual ~TimeUnit ()
 Destructor. More...
 
- Public Member Functions inherited from icu::MeasureUnit
 MeasureUnit ()
 Default constructor. More...
 
 MeasureUnit (const MeasureUnit &other)
 Copy constructor. More...
 
MeasureUnitoperator= (const MeasureUnit &other)
 Assignment operator. More...
 
virtual ~MeasureUnit ()
 Destructor. More...
 
virtual UBool operator== (const UObject &other) const
 Equality operator. More...
 
UBool operator!= (const UObject &other) const
 Inequality operator. More...
 
const char * getType () const
 Get the type. More...
 
const char * getSubtype () const
 Get the sub type. More...
 
int32_t getIndex () const
 ICU use only. More...
 
- Public Member Functions inherited from icu::UObject
virtual ~UObject ()
 Destructor. More...
 

Static Public Member Functions

static TimeUnitcreateInstance (UTimeUnitFields timeUnitField, UErrorCode &status)
 Create Instance. More...
 
static UClassID getStaticClassID ()
 Returns the class ID for this class. More...
 
- Static Public Member Functions inherited from icu::MeasureUnit
static int32_t getAvailable (MeasureUnit *destArray, int32_t destCapacity, UErrorCode &errorCode)
 getAvailable gets all of the available units. More...
 
static int32_t getAvailable (const char *type, MeasureUnit *destArray, int32_t destCapacity, UErrorCode &errorCode)
 getAvailable gets all of the available units for a specific type. More...
 
static StringEnumerationgetAvailableTypes (UErrorCode &errorCode)
 getAvailableTypes gets all of the available types. More...
 
static UClassID getStaticClassID (void)
 Return the class ID for this class. More...
 
static int32_t getIndexCount ()
 ICU use only. More...
 
static int32_t internalGetIndexForTypeAndSubtype (const char *type, const char *subtype)
 ICU use only. More...
 
static MeasureUnit resolveUnitPerUnit (const MeasureUnit &unit, const MeasureUnit &perUnit, bool *isResolved)
 ICU use only. More...
 
static MeasureUnitcreateGForce (UErrorCode &status)
 Returns by pointer, unit of acceleration: g-force. More...
 
static MeasureUnit getGForce ()
 Returns by value, unit of acceleration: g-force. More...
 
static MeasureUnitcreateMeterPerSecondSquared (UErrorCode &status)
 Returns by pointer, unit of acceleration: meter-per-second-squared. More...
 
static MeasureUnit getMeterPerSecondSquared ()
 Returns by value, unit of acceleration: meter-per-second-squared. More...
 
static MeasureUnitcreateArcMinute (UErrorCode &status)
 Returns by pointer, unit of angle: arc-minute. More...
 
static MeasureUnit getArcMinute ()
 Returns by value, unit of angle: arc-minute. More...
 
static MeasureUnitcreateArcSecond (UErrorCode &status)
 Returns by pointer, unit of angle: arc-second. More...
 
static MeasureUnit getArcSecond ()
 Returns by value, unit of angle: arc-second. More...
 
static MeasureUnitcreateDegree (UErrorCode &status)
 Returns by pointer, unit of angle: degree. More...
 
static MeasureUnit getDegree ()
 Returns by value, unit of angle: degree. More...
 
static MeasureUnitcreateRadian (UErrorCode &status)
 Returns by pointer, unit of angle: radian. More...
 
static MeasureUnit getRadian ()
 Returns by value, unit of angle: radian. More...
 
static MeasureUnitcreateRevolutionAngle (UErrorCode &status)
 Returns by pointer, unit of angle: revolution. More...
 
static MeasureUnit getRevolutionAngle ()
 Returns by value, unit of angle: revolution. More...
 
static MeasureUnitcreateAcre (UErrorCode &status)
 Returns by pointer, unit of area: acre. More...
 
static MeasureUnit getAcre ()
 Returns by value, unit of area: acre. More...
 
static MeasureUnitcreateDunam (UErrorCode &status)
 Returns by pointer, unit of area: dunam. More...
 
static MeasureUnit getDunam ()
 Returns by value, unit of area: dunam. More...
 
static MeasureUnitcreateHectare (UErrorCode &status)
 Returns by pointer, unit of area: hectare. More...
 
static MeasureUnit getHectare ()
 Returns by value, unit of area: hectare. More...
 
static MeasureUnitcreateSquareCentimeter (UErrorCode &status)
 Returns by pointer, unit of area: square-centimeter. More...
 
static MeasureUnit getSquareCentimeter ()
 Returns by value, unit of area: square-centimeter. More...
 
static MeasureUnitcreateSquareFoot (UErrorCode &status)
 Returns by pointer, unit of area: square-foot. More...
 
static MeasureUnit getSquareFoot ()
 Returns by value, unit of area: square-foot. More...
 
static MeasureUnitcreateSquareInch (UErrorCode &status)
 Returns by pointer, unit of area: square-inch. More...
 
static MeasureUnit getSquareInch ()
 Returns by value, unit of area: square-inch. More...
 
static MeasureUnitcreateSquareKilometer (UErrorCode &status)
 Returns by pointer, unit of area: square-kilometer. More...
 
static MeasureUnit getSquareKilometer ()
 Returns by value, unit of area: square-kilometer. More...
 
static MeasureUnitcreateSquareMeter (UErrorCode &status)
 Returns by pointer, unit of area: square-meter. More...
 
static MeasureUnit getSquareMeter ()
 Returns by value, unit of area: square-meter. More...
 
static MeasureUnitcreateSquareMile (UErrorCode &status)
 Returns by pointer, unit of area: square-mile. More...
 
static MeasureUnit getSquareMile ()
 Returns by value, unit of area: square-mile. More...
 
static MeasureUnitcreateSquareYard (UErrorCode &status)
 Returns by pointer, unit of area: square-yard. More...
 
static MeasureUnit getSquareYard ()
 Returns by value, unit of area: square-yard. More...
 
static MeasureUnitcreateKarat (UErrorCode &status)
 Returns by pointer, unit of concentr: karat. More...
 
static MeasureUnit getKarat ()
 Returns by value, unit of concentr: karat. More...
 
static MeasureUnitcreateMilligramPerDeciliter (UErrorCode &status)
 Returns by pointer, unit of concentr: milligram-per-deciliter. More...
 
static MeasureUnit getMilligramPerDeciliter ()
 Returns by value, unit of concentr: milligram-per-deciliter. More...
 
static MeasureUnitcreateMillimolePerLiter (UErrorCode &status)
 Returns by pointer, unit of concentr: millimole-per-liter. More...
 
static MeasureUnit getMillimolePerLiter ()
 Returns by value, unit of concentr: millimole-per-liter. More...
 
static MeasureUnitcreateMole (UErrorCode &status)
 Returns by pointer, unit of concentr: mole. More...
 
static MeasureUnit getMole ()
 Returns by value, unit of concentr: mole. More...
 
static MeasureUnitcreatePartPerMillion (UErrorCode &status)
 Returns by pointer, unit of concentr: part-per-million. More...
 
static MeasureUnit getPartPerMillion ()
 Returns by value, unit of concentr: part-per-million. More...
 
static MeasureUnitcreatePercent (UErrorCode &status)
 Returns by pointer, unit of concentr: percent. More...
 
static MeasureUnit getPercent ()
 Returns by value, unit of concentr: percent. More...
 
static MeasureUnitcreatePermille (UErrorCode &status)
 Returns by pointer, unit of concentr: permille. More...
 
static MeasureUnit getPermille ()
 Returns by value, unit of concentr: permille. More...
 
static MeasureUnitcreatePermyriad (UErrorCode &status)
 Returns by pointer, unit of concentr: permyriad. More...
 
static MeasureUnit getPermyriad ()
 Returns by value, unit of concentr: permyriad. More...
 
static MeasureUnitcreateLiterPer100Kilometers (UErrorCode &status)
 Returns by pointer, unit of consumption: liter-per-100kilometers. More...
 
static MeasureUnit getLiterPer100Kilometers ()
 Returns by value, unit of consumption: liter-per-100kilometers. More...
 
static MeasureUnitcreateLiterPerKilometer (UErrorCode &status)
 Returns by pointer, unit of consumption: liter-per-kilometer. More...
 
static MeasureUnit getLiterPerKilometer ()
 Returns by value, unit of consumption: liter-per-kilometer. More...
 
static MeasureUnitcreateMilePerGallon (UErrorCode &status)
 Returns by pointer, unit of consumption: mile-per-gallon. More...
 
static MeasureUnit getMilePerGallon ()
 Returns by value, unit of consumption: mile-per-gallon. More...
 
static MeasureUnitcreateMilePerGallonImperial (UErrorCode &status)
 Returns by pointer, unit of consumption: mile-per-gallon-imperial. More...
 
static MeasureUnit getMilePerGallonImperial ()
 Returns by value, unit of consumption: mile-per-gallon-imperial. More...
 
static MeasureUnitcreateBit (UErrorCode &status)
 Returns by pointer, unit of digital: bit. More...
 
static MeasureUnit getBit ()
 Returns by value, unit of digital: bit. More...
 
static MeasureUnitcreateByte (UErrorCode &status)
 Returns by pointer, unit of digital: byte. More...
 
static MeasureUnit getByte ()
 Returns by value, unit of digital: byte. More...
 
static MeasureUnitcreateGigabit (UErrorCode &status)
 Returns by pointer, unit of digital: gigabit. More...
 
static MeasureUnit getGigabit ()
 Returns by value, unit of digital: gigabit. More...
 
static MeasureUnitcreateGigabyte (UErrorCode &status)
 Returns by pointer, unit of digital: gigabyte. More...
 
static MeasureUnit getGigabyte ()
 Returns by value, unit of digital: gigabyte. More...
 
static MeasureUnitcreateKilobit (UErrorCode &status)
 Returns by pointer, unit of digital: kilobit. More...
 
static MeasureUnit getKilobit ()
 Returns by value, unit of digital: kilobit. More...
 
static MeasureUnitcreateKilobyte (UErrorCode &status)
 Returns by pointer, unit of digital: kilobyte. More...
 
static MeasureUnit getKilobyte ()
 Returns by value, unit of digital: kilobyte. More...
 
static MeasureUnitcreateMegabit (UErrorCode &status)
 Returns by pointer, unit of digital: megabit. More...
 
static MeasureUnit getMegabit ()
 Returns by value, unit of digital: megabit. More...
 
static MeasureUnitcreateMegabyte (UErrorCode &status)
 Returns by pointer, unit of digital: megabyte. More...
 
static MeasureUnit getMegabyte ()
 Returns by value, unit of digital: megabyte. More...
 
static MeasureUnitcreatePetabyte (UErrorCode &status)
 Returns by pointer, unit of digital: petabyte. More...
 
static MeasureUnit getPetabyte ()
 Returns by value, unit of digital: petabyte. More...
 
static MeasureUnitcreateTerabit (UErrorCode &status)
 Returns by pointer, unit of digital: terabit. More...
 
static MeasureUnit getTerabit ()
 Returns by value, unit of digital: terabit. More...
 
static MeasureUnitcreateTerabyte (UErrorCode &status)
 Returns by pointer, unit of digital: terabyte. More...
 
static MeasureUnit getTerabyte ()
 Returns by value, unit of digital: terabyte. More...
 
static MeasureUnitcreateCentury (UErrorCode &status)
 Returns by pointer, unit of duration: century. More...
 
static MeasureUnit getCentury ()
 Returns by value, unit of duration: century. More...
 
static MeasureUnitcreateDay (UErrorCode &status)
 Returns by pointer, unit of duration: day. More...
 
static MeasureUnit getDay ()
 Returns by value, unit of duration: day. More...
 
static MeasureUnitcreateDayPerson (UErrorCode &status)
 Returns by pointer, unit of duration: day-person. More...
 
static MeasureUnit getDayPerson ()
 Returns by value, unit of duration: day-person. More...
 
static MeasureUnitcreateHour (UErrorCode &status)
 Returns by pointer, unit of duration: hour. More...
 
static MeasureUnit getHour ()
 Returns by value, unit of duration: hour. More...
 
static MeasureUnitcreateMicrosecond (UErrorCode &status)
 Returns by pointer, unit of duration: microsecond. More...
 
static MeasureUnit getMicrosecond ()
 Returns by value, unit of duration: microsecond. More...
 
static MeasureUnitcreateMillisecond (UErrorCode &status)
 Returns by pointer, unit of duration: millisecond. More...
 
static MeasureUnit getMillisecond ()
 Returns by value, unit of duration: millisecond. More...
 
static MeasureUnitcreateMinute (UErrorCode &status)
 Returns by pointer, unit of duration: minute. More...
 
static MeasureUnit getMinute ()
 Returns by value, unit of duration: minute. More...
 
static MeasureUnitcreateMonth (UErrorCode &status)
 Returns by pointer, unit of duration: month. More...
 
static MeasureUnit getMonth ()
 Returns by value, unit of duration: month. More...
 
static MeasureUnitcreateMonthPerson (UErrorCode &status)
 Returns by pointer, unit of duration: month-person. More...
 
static MeasureUnit getMonthPerson ()
 Returns by value, unit of duration: month-person. More...
 
static MeasureUnitcreateNanosecond (UErrorCode &status)
 Returns by pointer, unit of duration: nanosecond. More...
 
static MeasureUnit getNanosecond ()
 Returns by value, unit of duration: nanosecond. More...
 
static MeasureUnitcreateSecond (UErrorCode &status)
 Returns by pointer, unit of duration: second. More...
 
static MeasureUnit getSecond ()
 Returns by value, unit of duration: second. More...
 
static MeasureUnitcreateWeek (UErrorCode &status)
 Returns by pointer, unit of duration: week. More...
 
static MeasureUnit getWeek ()
 Returns by value, unit of duration: week. More...
 
static MeasureUnitcreateWeekPerson (UErrorCode &status)
 Returns by pointer, unit of duration: week-person. More...
 
static MeasureUnit getWeekPerson ()
 Returns by value, unit of duration: week-person. More...
 
static MeasureUnitcreateYear (UErrorCode &status)
 Returns by pointer, unit of duration: year. More...
 
static MeasureUnit getYear ()
 Returns by value, unit of duration: year. More...
 
static MeasureUnitcreateYearPerson (UErrorCode &status)
 Returns by pointer, unit of duration: year-person. More...
 
static MeasureUnit getYearPerson ()
 Returns by value, unit of duration: year-person. More...
 
static MeasureUnitcreateAmpere (UErrorCode &status)
 Returns by pointer, unit of electric: ampere. More...
 
static MeasureUnit getAmpere ()
 Returns by value, unit of electric: ampere. More...
 
static MeasureUnitcreateMilliampere (UErrorCode &status)
 Returns by pointer, unit of electric: milliampere. More...
 
static MeasureUnit getMilliampere ()
 Returns by value, unit of electric: milliampere. More...
 
static MeasureUnitcreateOhm (UErrorCode &status)
 Returns by pointer, unit of electric: ohm. More...
 
static MeasureUnit getOhm ()
 Returns by value, unit of electric: ohm. More...
 
static MeasureUnitcreateVolt (UErrorCode &status)
 Returns by pointer, unit of electric: volt. More...
 
static MeasureUnit getVolt ()
 Returns by value, unit of electric: volt. More...
 
static MeasureUnitcreateBritishThermalUnit (UErrorCode &status)
 Returns by pointer, unit of energy: british-thermal-unit. More...
 
static MeasureUnit getBritishThermalUnit ()
 Returns by value, unit of energy: british-thermal-unit. More...
 
static MeasureUnitcreateCalorie (UErrorCode &status)
 Returns by pointer, unit of energy: calorie. More...
 
static MeasureUnit getCalorie ()
 Returns by value, unit of energy: calorie. More...
 
static MeasureUnitcreateElectronvolt (UErrorCode &status)
 Returns by pointer, unit of energy: electronvolt. More...
 
static MeasureUnit getElectronvolt ()
 Returns by value, unit of energy: electronvolt. More...
 
static MeasureUnitcreateFoodcalorie (UErrorCode &status)
 Returns by pointer, unit of energy: foodcalorie. More...
 
static MeasureUnit getFoodcalorie ()
 Returns by value, unit of energy: foodcalorie. More...
 
static MeasureUnitcreateJoule (UErrorCode &status)
 Returns by pointer, unit of energy: joule. More...
 
static MeasureUnit getJoule ()
 Returns by value, unit of energy: joule. More...
 
static MeasureUnitcreateKilocalorie (UErrorCode &status)
 Returns by pointer, unit of energy: kilocalorie. More...
 
static MeasureUnit getKilocalorie ()
 Returns by value, unit of energy: kilocalorie. More...
 
static MeasureUnitcreateKilojoule (UErrorCode &status)
 Returns by pointer, unit of energy: kilojoule. More...
 
static MeasureUnit getKilojoule ()
 Returns by value, unit of energy: kilojoule. More...
 
static MeasureUnitcreateKilowattHour (UErrorCode &status)
 Returns by pointer, unit of energy: kilowatt-hour. More...
 
static MeasureUnit getKilowattHour ()
 Returns by value, unit of energy: kilowatt-hour. More...
 
static MeasureUnitcreateNewton (UErrorCode &status)
 Returns by pointer, unit of force: newton. More...
 
static MeasureUnit getNewton ()
 Returns by value, unit of force: newton. More...
 
static MeasureUnitcreatePoundForce (UErrorCode &status)
 Returns by pointer, unit of force: pound-force. More...
 
static MeasureUnit getPoundForce ()
 Returns by value, unit of force: pound-force. More...
 
static MeasureUnitcreateGigahertz (UErrorCode &status)
 Returns by pointer, unit of frequency: gigahertz. More...
 
static MeasureUnit getGigahertz ()
 Returns by value, unit of frequency: gigahertz. More...
 
static MeasureUnitcreateHertz (UErrorCode &status)
 Returns by pointer, unit of frequency: hertz. More...
 
static MeasureUnit getHertz ()
 Returns by value, unit of frequency: hertz. More...
 
static MeasureUnitcreateKilohertz (UErrorCode &status)
 Returns by pointer, unit of frequency: kilohertz. More...
 
static MeasureUnit getKilohertz ()
 Returns by value, unit of frequency: kilohertz. More...
 
static MeasureUnitcreateMegahertz (UErrorCode &status)
 Returns by pointer, unit of frequency: megahertz. More...
 
static MeasureUnit getMegahertz ()
 Returns by value, unit of frequency: megahertz. More...
 
static MeasureUnitcreateAstronomicalUnit (UErrorCode &status)
 Returns by pointer, unit of length: astronomical-unit. More...
 
static MeasureUnit getAstronomicalUnit ()
 Returns by value, unit of length: astronomical-unit. More...
 
static MeasureUnitcreateCentimeter (UErrorCode &status)
 Returns by pointer, unit of length: centimeter. More...
 
static MeasureUnit getCentimeter ()
 Returns by value, unit of length: centimeter. More...
 
static MeasureUnitcreateDecimeter (UErrorCode &status)
 Returns by pointer, unit of length: decimeter. More...
 
static MeasureUnit getDecimeter ()
 Returns by value, unit of length: decimeter. More...
 
static MeasureUnitcreateFathom (UErrorCode &status)
 Returns by pointer, unit of length: fathom. More...
 
static MeasureUnit getFathom ()
 Returns by value, unit of length: fathom. More...
 
static MeasureUnitcreateFoot (UErrorCode &status)
 Returns by pointer, unit of length: foot. More...
 
static MeasureUnit getFoot ()
 Returns by value, unit of length: foot. More...
 
static MeasureUnitcreateFurlong (UErrorCode &status)
 Returns by pointer, unit of length: furlong. More...
 
static MeasureUnit getFurlong ()
 Returns by value, unit of length: furlong. More...
 
static MeasureUnitcreateInch (UErrorCode &status)
 Returns by pointer, unit of length: inch. More...
 
static MeasureUnit getInch ()
 Returns by value, unit of length: inch. More...
 
static MeasureUnitcreateKilometer (UErrorCode &status)
 Returns by pointer, unit of length: kilometer. More...
 
static MeasureUnit getKilometer ()
 Returns by value, unit of length: kilometer. More...
 
static MeasureUnitcreateLightYear (UErrorCode &status)
 Returns by pointer, unit of length: light-year. More...
 
static MeasureUnit getLightYear ()
 Returns by value, unit of length: light-year. More...
 
static MeasureUnitcreateMeter (UErrorCode &status)
 Returns by pointer, unit of length: meter. More...
 
static MeasureUnit getMeter ()
 Returns by value, unit of length: meter. More...
 
static MeasureUnitcreateMicrometer (UErrorCode &status)
 Returns by pointer, unit of length: micrometer. More...
 
static MeasureUnit getMicrometer ()
 Returns by value, unit of length: micrometer. More...
 
static MeasureUnitcreateMile (UErrorCode &status)
 Returns by pointer, unit of length: mile. More...
 
static MeasureUnit getMile ()
 Returns by value, unit of length: mile. More...
 
static MeasureUnitcreateMileScandinavian (UErrorCode &status)
 Returns by pointer, unit of length: mile-scandinavian. More...
 
static MeasureUnit getMileScandinavian ()
 Returns by value, unit of length: mile-scandinavian. More...
 
static MeasureUnitcreateMillimeter (UErrorCode &status)
 Returns by pointer, unit of length: millimeter. More...
 
static MeasureUnit getMillimeter ()
 Returns by value, unit of length: millimeter. More...
 
static MeasureUnitcreateNanometer (UErrorCode &status)
 Returns by pointer, unit of length: nanometer. More...
 
static MeasureUnit getNanometer ()
 Returns by value, unit of length: nanometer. More...
 
static MeasureUnitcreateNauticalMile (UErrorCode &status)
 Returns by pointer, unit of length: nautical-mile. More...
 
static MeasureUnit getNauticalMile ()
 Returns by value, unit of length: nautical-mile. More...
 
static MeasureUnitcreateParsec (UErrorCode &status)
 Returns by pointer, unit of length: parsec. More...
 
static MeasureUnit getParsec ()
 Returns by value, unit of length: parsec. More...
 
static MeasureUnitcreatePicometer (UErrorCode &status)
 Returns by pointer, unit of length: picometer. More...
 
static MeasureUnit getPicometer ()
 Returns by value, unit of length: picometer. More...
 
static MeasureUnitcreatePoint (UErrorCode &status)
 Returns by pointer, unit of length: point. More...
 
static MeasureUnit getPoint ()
 Returns by value, unit of length: point. More...
 
static MeasureUnitcreateSolarRadius (UErrorCode &status)
 Returns by pointer, unit of length: solar-radius. More...
 
static MeasureUnit getSolarRadius ()
 Returns by value, unit of length: solar-radius. More...
 
static MeasureUnitcreateYard (UErrorCode &status)
 Returns by pointer, unit of length: yard. More...
 
static MeasureUnit getYard ()
 Returns by value, unit of length: yard. More...
 
static MeasureUnitcreateLux (UErrorCode &status)
 Returns by pointer, unit of light: lux. More...
 
static MeasureUnit getLux ()
 Returns by value, unit of light: lux. More...
 
static MeasureUnitcreateSolarLuminosity (UErrorCode &status)
 Returns by pointer, unit of light: solar-luminosity. More...
 
static MeasureUnit getSolarLuminosity ()
 Returns by value, unit of light: solar-luminosity. More...
 
static MeasureUnitcreateCarat (UErrorCode &status)
 Returns by pointer, unit of mass: carat. More...
 
static MeasureUnit getCarat ()
 Returns by value, unit of mass: carat. More...
 
static MeasureUnitcreateDalton (UErrorCode &status)
 Returns by pointer, unit of mass: dalton. More...
 
static MeasureUnit getDalton ()
 Returns by value, unit of mass: dalton. More...
 
static MeasureUnitcreateEarthMass (UErrorCode &status)
 Returns by pointer, unit of mass: earth-mass. More...
 
static MeasureUnit getEarthMass ()
 Returns by value, unit of mass: earth-mass. More...
 
static MeasureUnitcreateGram (UErrorCode &status)
 Returns by pointer, unit of mass: gram. More...
 
static MeasureUnit getGram ()
 Returns by value, unit of mass: gram. More...
 
static MeasureUnitcreateKilogram (UErrorCode &status)
 Returns by pointer, unit of mass: kilogram. More...
 
static MeasureUnit getKilogram ()
 Returns by value, unit of mass: kilogram. More...
 
static MeasureUnitcreateMetricTon (UErrorCode &status)
 Returns by pointer, unit of mass: metric-ton. More...
 
static MeasureUnit getMetricTon ()
 Returns by value, unit of mass: metric-ton. More...
 
static MeasureUnitcreateMicrogram (UErrorCode &status)
 Returns by pointer, unit of mass: microgram. More...
 
static MeasureUnit getMicrogram ()
 Returns by value, unit of mass: microgram. More...
 
static MeasureUnitcreateMilligram (UErrorCode &status)
 Returns by pointer, unit of mass: milligram. More...
 
static MeasureUnit getMilligram ()
 Returns by value, unit of mass: milligram. More...
 
static MeasureUnitcreateOunce (UErrorCode &status)
 Returns by pointer, unit of mass: ounce. More...
 
static MeasureUnit getOunce ()
 Returns by value, unit of mass: ounce. More...
 
static MeasureUnitcreateOunceTroy (UErrorCode &status)
 Returns by pointer, unit of mass: ounce-troy. More...
 
static MeasureUnit getOunceTroy ()
 Returns by value, unit of mass: ounce-troy. More...
 
static MeasureUnitcreatePound (UErrorCode &status)
 Returns by pointer, unit of mass: pound. More...
 
static MeasureUnit getPound ()
 Returns by value, unit of mass: pound. More...
 
static MeasureUnitcreateSolarMass (UErrorCode &status)
 Returns by pointer, unit of mass: solar-mass. More...
 
static MeasureUnit getSolarMass ()
 Returns by value, unit of mass: solar-mass. More...
 
static MeasureUnitcreateStone (UErrorCode &status)
 Returns by pointer, unit of mass: stone. More...
 
static MeasureUnit getStone ()
 Returns by value, unit of mass: stone. More...
 
static MeasureUnitcreateTon (UErrorCode &status)
 Returns by pointer, unit of mass: ton. More...
 
static MeasureUnit getTon ()
 Returns by value, unit of mass: ton. More...
 
static MeasureUnitcreateGigawatt (UErrorCode &status)
 Returns by pointer, unit of power: gigawatt. More...
 
static MeasureUnit getGigawatt ()
 Returns by value, unit of power: gigawatt. More...
 
static MeasureUnitcreateHorsepower (UErrorCode &status)
 Returns by pointer, unit of power: horsepower. More...
 
static MeasureUnit getHorsepower ()
 Returns by value, unit of power: horsepower. More...
 
static MeasureUnitcreateKilowatt (UErrorCode &status)
 Returns by pointer, unit of power: kilowatt. More...
 
static MeasureUnit getKilowatt ()
 Returns by value, unit of power: kilowatt. More...
 
static MeasureUnitcreateMegawatt (UErrorCode &status)
 Returns by pointer, unit of power: megawatt. More...
 
static MeasureUnit getMegawatt ()
 Returns by value, unit of power: megawatt. More...
 
static MeasureUnitcreateMilliwatt (UErrorCode &status)
 Returns by pointer, unit of power: milliwatt. More...
 
static MeasureUnit getMilliwatt ()
 Returns by value, unit of power: milliwatt. More...
 
static MeasureUnitcreateWatt (UErrorCode &status)
 Returns by pointer, unit of power: watt. More...
 
static MeasureUnit getWatt ()
 Returns by value, unit of power: watt. More...
 
static MeasureUnitcreateAtmosphere (UErrorCode &status)
 Returns by pointer, unit of pressure: atmosphere. More...
 
static MeasureUnit getAtmosphere ()
 Returns by value, unit of pressure: atmosphere. More...
 
static MeasureUnitcreateHectopascal (UErrorCode &status)
 Returns by pointer, unit of pressure: hectopascal. More...
 
static MeasureUnit getHectopascal ()
 Returns by value, unit of pressure: hectopascal. More...
 
static MeasureUnitcreateInchHg (UErrorCode &status)
 Returns by pointer, unit of pressure: inch-hg. More...
 
static MeasureUnit getInchHg ()
 Returns by value, unit of pressure: inch-hg. More...
 
static MeasureUnitcreateKilopascal (UErrorCode &status)
 Returns by pointer, unit of pressure: kilopascal. More...
 
static MeasureUnit getKilopascal ()
 Returns by value, unit of pressure: kilopascal. More...
 
static MeasureUnitcreateMegapascal (UErrorCode &status)
 Returns by pointer, unit of pressure: megapascal. More...
 
static MeasureUnit getMegapascal ()
 Returns by value, unit of pressure: megapascal. More...
 
static MeasureUnitcreateMillibar (UErrorCode &status)
 Returns by pointer, unit of pressure: millibar. More...
 
static MeasureUnit getMillibar ()
 Returns by value, unit of pressure: millibar. More...
 
static MeasureUnitcreateMillimeterOfMercury (UErrorCode &status)
 Returns by pointer, unit of pressure: millimeter-of-mercury. More...
 
static MeasureUnit getMillimeterOfMercury ()
 Returns by value, unit of pressure: millimeter-of-mercury. More...
 
static MeasureUnitcreatePoundPerSquareInch (UErrorCode &status)
 Returns by pointer, unit of pressure: pound-per-square-inch. More...
 
static MeasureUnit getPoundPerSquareInch ()
 Returns by value, unit of pressure: pound-per-square-inch. More...
 
static MeasureUnitcreateKilometerPerHour (UErrorCode &status)
 Returns by pointer, unit of speed: kilometer-per-hour. More...
 
static MeasureUnit getKilometerPerHour ()
 Returns by value, unit of speed: kilometer-per-hour. More...
 
static MeasureUnitcreateKnot (UErrorCode &status)
 Returns by pointer, unit of speed: knot. More...
 
static MeasureUnit getKnot ()
 Returns by value, unit of speed: knot. More...
 
static MeasureUnitcreateMeterPerSecond (UErrorCode &status)
 Returns by pointer, unit of speed: meter-per-second. More...
 
static MeasureUnit getMeterPerSecond ()
 Returns by value, unit of speed: meter-per-second. More...
 
static MeasureUnitcreateMilePerHour (UErrorCode &status)
 Returns by pointer, unit of speed: mile-per-hour. More...
 
static MeasureUnit getMilePerHour ()
 Returns by value, unit of speed: mile-per-hour. More...
 
static MeasureUnitcreateCelsius (UErrorCode &status)
 Returns by pointer, unit of temperature: celsius. More...
 
static MeasureUnit getCelsius ()
 Returns by value, unit of temperature: celsius. More...
 
static MeasureUnitcreateFahrenheit (UErrorCode &status)
 Returns by pointer, unit of temperature: fahrenheit. More...
 
static MeasureUnit getFahrenheit ()
 Returns by value, unit of temperature: fahrenheit. More...
 
static MeasureUnitcreateGenericTemperature (UErrorCode &status)
 Returns by pointer, unit of temperature: generic. More...
 
static MeasureUnit getGenericTemperature ()
 Returns by value, unit of temperature: generic. More...
 
static MeasureUnitcreateKelvin (UErrorCode &status)
 Returns by pointer, unit of temperature: kelvin. More...
 
static MeasureUnit getKelvin ()
 Returns by value, unit of temperature: kelvin. More...
 
static MeasureUnitcreateNewtonMeter (UErrorCode &status)
 Returns by pointer, unit of torque: newton-meter. More...
 
static MeasureUnit getNewtonMeter ()
 Returns by value, unit of torque: newton-meter. More...
 
static MeasureUnitcreatePoundFoot (UErrorCode &status)
 Returns by pointer, unit of torque: pound-foot. More...
 
static MeasureUnit getPoundFoot ()
 Returns by value, unit of torque: pound-foot. More...
 
static MeasureUnitcreateAcreFoot (UErrorCode &status)
 Returns by pointer, unit of volume: acre-foot. More...
 
static MeasureUnit getAcreFoot ()
 Returns by value, unit of volume: acre-foot. More...
 
static MeasureUnitcreateBarrel (UErrorCode &status)
 Returns by pointer, unit of volume: barrel. More...
 
static MeasureUnit getBarrel ()
 Returns by value, unit of volume: barrel. More...
 
static MeasureUnitcreateBushel (UErrorCode &status)
 Returns by pointer, unit of volume: bushel. More...
 
static MeasureUnit getBushel ()
 Returns by value, unit of volume: bushel. More...
 
static MeasureUnitcreateCentiliter (UErrorCode &status)
 Returns by pointer, unit of volume: centiliter. More...
 
static MeasureUnit getCentiliter ()
 Returns by value, unit of volume: centiliter. More...
 
static MeasureUnitcreateCubicCentimeter (UErrorCode &status)
 Returns by pointer, unit of volume: cubic-centimeter. More...
 
static MeasureUnit getCubicCentimeter ()
 Returns by value, unit of volume: cubic-centimeter. More...
 
static MeasureUnitcreateCubicFoot (UErrorCode &status)
 Returns by pointer, unit of volume: cubic-foot. More...
 
static MeasureUnit getCubicFoot ()
 Returns by value, unit of volume: cubic-foot. More...
 
static MeasureUnitcreateCubicInch (UErrorCode &status)
 Returns by pointer, unit of volume: cubic-inch. More...
 
static MeasureUnit getCubicInch ()
 Returns by value, unit of volume: cubic-inch. More...
 
static MeasureUnitcreateCubicKilometer (UErrorCode &status)
 Returns by pointer, unit of volume: cubic-kilometer. More...
 
static MeasureUnit getCubicKilometer ()
 Returns by value, unit of volume: cubic-kilometer. More...
 
static MeasureUnitcreateCubicMeter (UErrorCode &status)
 Returns by pointer, unit of volume: cubic-meter. More...
 
static MeasureUnit getCubicMeter ()
 Returns by value, unit of volume: cubic-meter. More...
 
static MeasureUnitcreateCubicMile (UErrorCode &status)
 Returns by pointer, unit of volume: cubic-mile. More...
 
static MeasureUnit getCubicMile ()
 Returns by value, unit of volume: cubic-mile. More...
 
static MeasureUnitcreateCubicYard (UErrorCode &status)
 Returns by pointer, unit of volume: cubic-yard. More...
 
static MeasureUnit getCubicYard ()
 Returns by value, unit of volume: cubic-yard. More...
 
static MeasureUnitcreateCup (UErrorCode &status)
 Returns by pointer, unit of volume: cup. More...
 
static MeasureUnit getCup ()
 Returns by value, unit of volume: cup. More...
 
static MeasureUnitcreateCupMetric (UErrorCode &status)
 Returns by pointer, unit of volume: cup-metric. More...
 
static MeasureUnit getCupMetric ()
 Returns by value, unit of volume: cup-metric. More...
 
static MeasureUnitcreateDeciliter (UErrorCode &status)
 Returns by pointer, unit of volume: deciliter. More...
 
static MeasureUnit getDeciliter ()
 Returns by value, unit of volume: deciliter. More...
 
static MeasureUnitcreateFluidOunce (UErrorCode &status)
 Returns by pointer, unit of volume: fluid-ounce. More...
 
static MeasureUnit getFluidOunce ()
 Returns by value, unit of volume: fluid-ounce. More...
 
static MeasureUnitcreateFluidOunceImperial (UErrorCode &status)
 Returns by pointer, unit of volume: fluid-ounce-imperial. More...
 
static MeasureUnit getFluidOunceImperial ()
 Returns by value, unit of volume: fluid-ounce-imperial. More...
 
static MeasureUnitcreateGallon (UErrorCode &status)
 Returns by pointer, unit of volume: gallon. More...
 
static MeasureUnit getGallon ()
 Returns by value, unit of volume: gallon. More...
 
static MeasureUnitcreateGallonImperial (UErrorCode &status)
 Returns by pointer, unit of volume: gallon-imperial. More...
 
static MeasureUnit getGallonImperial ()
 Returns by value, unit of volume: gallon-imperial. More...
 
static MeasureUnitcreateHectoliter (UErrorCode &status)
 Returns by pointer, unit of volume: hectoliter. More...
 
static MeasureUnit getHectoliter ()
 Returns by value, unit of volume: hectoliter. More...
 
static MeasureUnitcreateLiter (UErrorCode &status)
 Returns by pointer, unit of volume: liter. More...
 
static MeasureUnit getLiter ()
 Returns by value, unit of volume: liter. More...
 
static MeasureUnitcreateMegaliter (UErrorCode &status)
 Returns by pointer, unit of volume: megaliter. More...
 
static MeasureUnit getMegaliter ()
 Returns by value, unit of volume: megaliter. More...
 
static MeasureUnitcreateMilliliter (UErrorCode &status)
 Returns by pointer, unit of volume: milliliter. More...
 
static MeasureUnit getMilliliter ()
 Returns by value, unit of volume: milliliter. More...
 
static MeasureUnitcreatePint (UErrorCode &status)
 Returns by pointer, unit of volume: pint. More...
 
static MeasureUnit getPint ()
 Returns by value, unit of volume: pint. More...
 
static MeasureUnitcreatePintMetric (UErrorCode &status)
 Returns by pointer, unit of volume: pint-metric. More...
 
static MeasureUnit getPintMetric ()
 Returns by value, unit of volume: pint-metric. More...
 
static MeasureUnitcreateQuart (UErrorCode &status)
 Returns by pointer, unit of volume: quart. More...
 
static MeasureUnit getQuart ()
 Returns by value, unit of volume: quart. More...
 
static MeasureUnitcreateTablespoon (UErrorCode &status)
 Returns by pointer, unit of volume: tablespoon. More...
 
static MeasureUnit getTablespoon ()
 Returns by value, unit of volume: tablespoon. More...
 
static MeasureUnitcreateTeaspoon (UErrorCode &status)
 Returns by pointer, unit of volume: teaspoon. More...
 
static MeasureUnit getTeaspoon ()
 Returns by value, unit of volume: teaspoon. More...
 

Additional Inherited Members

- Protected Member Functions inherited from icu::MeasureUnit
void initTime (const char *timeId)
 For ICU use only. More...
 
void initCurrency (const char *isoCurrency)
 For ICU use only. More...
 
void initNoUnit (const char *subtype)
 For ICU use only. More...
 

Detailed Description

Measurement unit for time units.

See also
TimeUnitAmount
TimeUnit
Stable:
ICU 4.2

Definition at line 32 of file tmunit.h.

Member Enumeration Documentation

◆ UTimeUnitFields

Constants for all the time units we supported.

Stable:
ICU 4.2
Enumerator
UTIMEUNIT_FIELD_COUNT 

One more than the highest normal UTimeUnitFields value.

Deprecated:
ICU 58 The numeric value may change over time, see ICU ticket #12420.

Definition at line 38 of file tmunit.h.

Constructor & Destructor Documentation

◆ TimeUnit()

icu::TimeUnit::TimeUnit ( const TimeUnit other)

Copy operator.

Stable:
ICU 4.2

◆ ~TimeUnit()

virtual icu::TimeUnit::~TimeUnit ( )
virtual

Destructor.

Stable:
ICU 4.2

Member Function Documentation

◆ clone()

virtual UObject* icu::TimeUnit::clone ( ) const
virtual

Override clone.

Stable:
ICU 4.2

Reimplemented from icu::MeasureUnit.

◆ createInstance()

static TimeUnit* icu::TimeUnit::createInstance ( UTimeUnitFields  timeUnitField,
UErrorCode status 
)
static

Create Instance.

Parameters
timeUnitFieldtime unit field based on which the instance is created.
statusinput-output error code. If the timeUnitField is invalid, then this will be set to U_ILLEGAL_ARGUMENT_ERROR.
Returns
a TimeUnit instance
Stable:
ICU 4.2

◆ getDynamicClassID()

virtual UClassID icu::TimeUnit::getDynamicClassID ( ) const
virtual

Returns a unique class ID for this object POLYMORPHICALLY.

This method implements a simple form of RTTI used by ICU.

Returns
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.
Stable:
ICU 4.2

Reimplemented from icu::MeasureUnit.

◆ getStaticClassID()

static UClassID icu::TimeUnit::getStaticClassID ( )
static

Returns the class ID for this class.

This is used to compare to the return value of getDynamicClassID().

Returns
The class ID for all objects of this class.
Stable:
ICU 4.2

◆ getTimeUnitField()

UTimeUnitFields icu::TimeUnit::getTimeUnitField ( ) const

Get time unit field.

Returns
time unit field.
Stable:
ICU 4.2

◆ operator=()

TimeUnit& icu::TimeUnit::operator= ( const TimeUnit other)

Assignment operator.

Stable:
ICU 4.2

The documentation for this class was generated from the following file: