Rogue Wave Views |
Rogue Wave Views Documentation Home |
Base class representing a time unit (second, hour, year...). More...
#include <ilog/date.h>
Public Member Functions | |
IlTimeUnit () | |
Constructor. | |
virtual void | addTimeUnit (IlCalendar &date) const =0 |
Increments the given IlCalendar date by the time unit. More... | |
virtual IlTimeUnit * | copy () const =0 |
Returns an IlTimeUnit of the same type as the current object. The caller is responsible to delete this object. | |
virtual IlDouble | getMillis () const =0 |
Returns the duration of this time unit in milliseconds. More... | |
virtual void | snapToPreviousTimeUnit (IlCalendar &date) const =0 |
Snaps the given IlCalendar date to the previous time unit. More... | |
virtual char * | toString (IlDouble date) const =0 |
Returns a string representing the date according to this unit. More... | |
Base class representing a time unit (second, hour, year...).
Library: ilog
IlTimeUnit
is the base class from which time unit classes are derived (seconds, minutes, days, weeks, and so on).
IlvTimeScaleStepsUpdater
.
|
pure virtual |
Increments the given IlCalendar
date by the time unit.
For instance, if the unit is minutes, adds one minute to the date.
date | The date to modify. |
Implemented in IlTimeUnitYear, IlTimeUnitQuarter, IlTimeUnitMonth, IlTimeUnitWeek, IlTimeUnitDay, IlTimeUnitHour, IlTimeUnitMinute, IlTimeUnitSecond, and IlTimeUnitMilliSecond.
|
pure virtual |
Returns the duration of this time unit in milliseconds.
Implemented in IlTimeUnitYear, IlTimeUnitQuarter, IlTimeUnitMonth, IlTimeUnitWeek, IlTimeUnitDay, IlTimeUnitHour, IlTimeUnitMinute, IlTimeUnitSecond, and IlTimeUnitMilliSecond.
|
pure virtual |
Snaps the given IlCalendar
date to the previous time unit.
For instance, if the unit is minutes, seconds and milliseconds will be set to 0
.
date | The date to modify. |
Implemented in IlTimeUnitYear, IlTimeUnitQuarter, IlTimeUnitMonth, IlTimeUnitWeek, IlTimeUnitDay, IlTimeUnitHour, IlTimeUnitMinute, IlTimeUnitSecond, and IlTimeUnitMilliSecond.
|
pure virtual |
Returns a string representing the date according to this unit.
Returns an allocated string, which should be deleted with delete []
.
date | The date to convert. |
Implemented in IlTimeUnitYear, IlTimeUnitQuarter, IlTimeUnitMonth, IlTimeUnitWeek, IlTimeUnitDay, IlTimeUnitHour, IlTimeUnitMinute, IlTimeUnitSecond, and IlTimeUnitMilliSecond.
© Copyright 2015, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.