Views
Foundation Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions
IlTimeUnitQuarter Class Reference

Quarter time unit. More...

#include <ilog/date.h>

Inheritance diagram for IlTimeUnitQuarter:
IlTimeUnit

Public Member Functions

 IlTimeUnitQuarter ()
 Constructor.
 
virtual void addTimeUnit (IlCalendar &date) const
 Increments the given IlCalendar date by 1 quarter. More...
 
virtual IlTimeUnitcopy () const
 Returns an IlTimeUnitQuarter. More...
 
virtual IlDouble getMillis () const
 Returns the duration of this time unit in milliseconds. More...
 
virtual void snapToPreviousTimeUnit (IlCalendar &cal) const
 Snaps the given IlCalendar date to the last quarter. More...
 
virtual char * toString (IlDate date) const
 Returns a string representing the date in quarters. More...
 
- Public Member Functions inherited from IlTimeUnit
 IlTimeUnit ()
 Constructor.
 

Detailed Description

Quarter time unit.

Library: ilog

See also
IlvTimeScaleStepsUpdater.

Member Function Documentation

◆ addTimeUnit()

virtual void IlTimeUnitQuarter::addTimeUnit ( IlCalendar date) const
virtual

Increments the given IlCalendar date by 1 quarter.

Adds 1 quarter to date.

Parameters
dateThe date to change.

Implements IlTimeUnit.

◆ copy()

virtual IlTimeUnit* IlTimeUnitQuarter::copy ( ) const
virtual

Returns an IlTimeUnitQuarter.

Returns
A new IlTimeUnitQuarter.

Implements IlTimeUnit.

◆ getMillis()

virtual IlDouble IlTimeUnitQuarter::getMillis ( ) const
virtual

Returns the duration of this time unit in milliseconds.

Returns
The duration of this time unit in milliseconds.

Implements IlTimeUnit.

◆ snapToPreviousTimeUnit()

virtual void IlTimeUnitQuarter::snapToPreviousTimeUnit ( IlCalendar cal) const
virtual

Snaps the given IlCalendar date to the last quarter.

Sets cal to the first day of the quarter at 00:00.

Parameters
calThe date to change.

Implements IlTimeUnit.

◆ toString()

virtual char* IlTimeUnitQuarter::toString ( IlDate  date) const
virtual

Returns a string representing the date in quarters.

Returns an allocated string which should be deleted with delete [].

Parameters
dateThe date to convert.
Returns
a string of the "Qn YYYY" format, 'n' being the number of the quarter (1 to 4) (e.g. "Q2 2001" for 2nd quarter of 2001).

Implements IlTimeUnit.