API Guides > ConceptRT 3.x
WeekNumber Class Reference

Week number according to ISO 8601. More...

Detailed Description

Week number according to ISO 8601.

+ Inheritance diagram for WeekNumber:

Public Member Methods

 WeekNumber ()
 Default constructor. More...
 
 WeekNumber (TimeStamp timeStamp)
 Explicit convertion from TimeStamp. More...
 
 WeekNumber (const String &text)
 Explicit convertion from string. More...
 
 WeekNumber (Int32 year, Int32 week)
 Default constructor. More...
 
void SetWeekNumber (Int32 year, Int32 week)
 Sets the week number. More...
 
Int32 GetYear () const
 Gets the year. More...
 
Int32 GetWeek () const
 Gets the week. More...
 
TimeStamp ToTimeStamp () const
 Converts this week number to a time stamp. More...
 
void ConvertFrom (PCChar8 text)
 Convert from. More...
 
void ConvertTo (BaseStaticString &text) const
 Convert to. More...
 
WeekNumberoperator+= (const TimeSpan &timeSpan)
 Addition assignment operator. More...
 
WeekNumberoperator-= (const TimeSpan &timeSpan)
 Subtraction assignment operator. More...
 
Date GetDate (DayOfWeek DayOfWeek=dwMonday) const
 Gets a date. More...
 

Constructor & Destructor Documentation

Default constructor.

WeekNumber ( TimeStamp  timeStamp)
explicit

Explicit convertion from TimeStamp.

Parameters
timeStampThe time stamp.
WeekNumber ( const String text)
explicit

Explicit convertion from string.

Parameters
textThe text containing the weekNumber value. ("2011-04" means years 2011 week number 4)
RT Exceptions:
RT_ERROR_BAD_PARAMETER
WeekNumber ( Int32  year,
Int32  week 
)

Default constructor.

Parameters
yearThe year.
weekThe week.
RT Exceptions:
RT_ERROR_BAD_PARAMETER

Methods Documentation

void ConvertFrom ( PCChar8  text)
virtual

Convert from.

Parameters
textThe text containing the weekNumber value. ("2011-04" means years 2011 week number 4)
RT Exceptions:
RT_ERROR_BAD_PARAMETER

Implements IStringConvertible.

void ConvertTo ( BaseStaticString text) const
virtual

Convert to.

Parameters
text[in,out] The text.

Implements IStringConvertible.

Date GetDate ( DayOfWeek  DayOfWeek = dwMonday) const

Gets a date.

Parameters
DayOfWeek(optional) the day of week.
Returns
The date.
Int32 GetWeek ( ) const

Gets the week.

Returns
The week.
Int32 GetYear ( ) const

Gets the year.

Returns
The year.
WeekNumber& operator+= ( const TimeSpan timeSpan)

Addition assignment operator.

Parameters
timeSpanThe time span.
Returns
The result of the operation.
WeekNumber& operator-= ( const TimeSpan timeSpan)

Subtraction assignment operator.

Parameters
timeSpanThe time span.
Returns
The result of the operation.
void SetWeekNumber ( Int32  year,
Int32  week 
)

Sets the week number.

Parameters
yearThe year.
weekThe week.
RT Exceptions:
RT_ERROR_BAD_PARAMETER
TimeStamp ToTimeStamp ( ) const

Converts this week number to a time stamp.

Returns
A TimeStamp.