QCubed - A PHP5 rapid development MVC framework.
Home  |  Updates

classQDateTimeSpan

QDateTimeSpan Class Reference

Inherits QBaseClass.

Collaboration diagram for QDateTimeSpan:

List of all members.

Public Member Functions

Public Attributes

Protected Member Functions

Protected Attributes


Constructor & Destructor Documentation

QDateTimeSpan::__construct ( intSeconds = 0  ) 

References $intSeconds.


Member Function Documentation

QDateTimeSpan::__get ( strName  ) 

Override method to perform a property "Get" This will get the value of $strName

Parameters:
string $strName Name of the property to get
Returns:
mixed the returned property

Reimplemented from QBaseClass.

References GetDays(), GetHours(), GetMinutes(), GetMonths(), GetTimearray(), GetYears(), and QCallerException::IncrementOffset().

QDateTimeSpan::__set ( strName,
mixValue 
)

Override method to perform a property "Set" This will set the property $strName to be $mixValue

Parameters:
string $strName Name of the property to set
string $mixValue New value of the property
Returns:
mixed the property that was set

Reimplemented from QBaseClass.

References QType::Cast(), QCallerException::IncrementOffset(), and QType::Integer.

QDateTimeSpan::Add ( QDateTimeSpan dtsSpan  ) 

Adds a QDateTimeSpan to current QDateTimeSpan

Parameters:
QDateTimeSpan $dtsSpan

Referenced by SetFromQDateTime().

QDateTimeSpan::AddDays ( intDays  ) 

Adds an amount of days to the current QDateTimeSpan

Parameters:
int $intDays

References SecondsPerDay.

QDateTimeSpan::AddHours ( intHours  ) 

Adds an amount of hours to the current QDateTimeSpan

Parameters:
int $intHours

References SecondsPerHour.

QDateTimeSpan::AddMinutes ( intMinutes  ) 

Adds an amount of minutes to the current QDateTimeSpan

Parameters:
int $intMinutes

References SecondsPerMinute.

QDateTimeSpan::AddMonths ( intMonths  ) 

Adds an amount of months to the current QDateTimeSpan

Parameters:
int $intMonths

References SecondsPerMonth.

QDateTimeSpan::AddSeconds ( intSeconds  ) 

Adds an amount of seconds to the current QDateTimeSpan

Parameters:
int $intSeconds

References $intSeconds.

QDateTimeSpan::Difference ( QDateTimeSpan dtsSpan  ) 

Calculates the difference between this DateSpan and another DateSpan

Parameters:
QDateTimeSpan $dtsSpan
Returns:
new QDateTimeSpan

QDateTimeSpan::GetDays (  )  [protected]

Calculates the total whole days in the current QDateTimeSpan

Returns:
int

References IsNegative(), IsPositive(), and SecondsPerDay.

Referenced by __get().

QDateTimeSpan::GetHours (  )  [protected]

Calculates the total whole hours in the current QDateTimeSpan

Returns:
int

References IsNegative(), IsPositive(), and SecondsPerHour.

Referenced by __get().

QDateTimeSpan::GetMinutes (  )  [protected]

Calculates the total whole minutes in the current QDateTimeSpan

Returns:
int

References IsNegative(), IsPositive(), and SecondsPerMinute.

Referenced by __get().

QDateTimeSpan::GetMonths (  )  [protected]

Calculates the total whole months in the current QDateTimeSpan

Returns:
int

References IsNegative(), IsPositive(), and SecondsPerMonth.

Referenced by __get().

QDateTimeSpan::GetTimearray (  )  [protected]

Return an array of timeunints

Returns:
array of timeunits

References $intSeconds, IsNegative(), IsPositive(), SecondsPerDay, SecondsPerHour, SecondsPerMinute, SecondsPerMonth, and SecondsPerYear.

Referenced by __get(), and SimpleDisplay().

QDateTimeSpan::GetYears (  )  [protected]

Calculates the total whole years in the current QDateTimeSpan

Returns:
int

References IsNegative(), IsPositive(), and SecondsPerYear.

Referenced by __get().

QDateTimeSpan::IsNegative (  ) 

Checks if the current DateSpan is negative

Returns:
boolean

Referenced by GetDays(), GetHours(), GetMinutes(), GetMonths(), GetTimearray(), and GetYears().

QDateTimeSpan::IsPositive (  ) 

Checks if the current DateSpan is positive

Returns:
boolean

Referenced by GetDays(), GetHours(), GetMinutes(), GetMonths(), GetTimearray(), and GetYears().

QDateTimeSpan::IsZero (  ) 

Checks if the current DateSpan is zero

Returns:
boolean

QDateTimeSpan::SetFromQDateTime ( QDateTime dttFrom,
QDateTime dttTo 
)

Sets current QDateTimeSpan to the difference between two QDateTime objects

Parameters:
QDateTime $dttFrom
QDateTime $dttTo

References Add(), and QDateTime::Difference().

QDateTimeSpan::SimpleDisplay (  ) 

References GetTimearray().

QDateTimeSpan::Subtract ( QDateTimeSpan dtsSpan  ) 

Subtracts a QDateTimeSpan to current QDateTimeSpan

Parameters:
QDateTimeSpan $dtsSpan


Member Data Documentation

QDateTimeSpan::$intSeconds [protected]

Referenced by AddDays(), GetDays(), and GetTimearray().

Referenced by GetTimearray(), and GetYears().


The documentation for this class was generated from the following file: