Rogue Wave Views 5.6 |
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. | |
virtual IlDouble | getMillis () const =0 |
Returns the duration of this time unit in milliseconds. | |
virtual void | snapToPreviousTimeUnit (IlCalendar &cal) 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.
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
.
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 2012, 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.