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

Week time unit. More...

#include <ilog/date.h>

Inheritance diagram for IlTimeUnitWeek:
IlTimeUnit

Public Member Functions

 IlTimeUnitWeek ()
 Constructor.
 
virtual void addTimeUnit (IlCalendar &date) const
 Increments the given IlCalendar date by 1 week. More...
 
virtual IlTimeUnitcopy () const
 Returns an IlTimeUnitWeek. 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 week. More...
 
virtual char * toString (IlDate date) const
 Returns a string representing the date in weeks. More...
 
- Public Member Functions inherited from IlTimeUnit
 IlTimeUnit ()
 Constructor.
 

Detailed Description

Week time unit.

Library: ilog

See also
IlvTimeScaleStepsUpdater.

Member Function Documentation

◆ addTimeUnit()

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

Increments the given IlCalendar date by 1 week.

Adds 1 week to date.

Parameters
dateThe date to change.

Implements IlTimeUnit.

◆ copy()

virtual IlTimeUnit* IlTimeUnitWeek::copy ( ) const
virtual

Returns an IlTimeUnitWeek.

Returns
A new IlTimeUnitWeek.

Implements IlTimeUnit.

◆ getMillis()

virtual IlDouble IlTimeUnitWeek::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 IlTimeUnitWeek::snapToPreviousTimeUnit ( IlCalendar cal) const
virtual

Snaps the given IlCalendar date to the last week.

Sets cal to the first day of the week to 00:00.

Parameters
calThe date to change.

Implements IlTimeUnit.

◆ toString()

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

Returns a string representing the date in weeks.

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

Parameters
dateThe date to convert
Returns
A string of the "Wn" format, 'n' being the week of the year (e.g. "W12").

Implements IlTimeUnit.