Overview

Packages

  • Actions
  • Codegen
  • Controls
    • Base
  • DatabaseAdapters
  • Events
  • None
  • Sessions
  • Tests

Classes

  • AbstractControl_CodeGenerator
  • AjaxTimingForm
  • BBCodeParser
  • CalculatorForm
  • ComplexColumn
  • Event
  • ExampleForm
  • Examples
  • ExampleService
  • ExamplesForm
  • HtmlJqDoc
  • InjectForm
  • JavaScriptHelper
  • JqAttributes
  • JqDoc
  • JqIcon
  • Method
  • MyControl
  • MyQSlider_ChangeEvent
  • NavPanel
  • Option
  • Order
  • Project
  • ProjectPickerListBox
  • QAbstractCacheProvider
  • QAbstractHtmlTableColumn
  • QAbstractHtmlTableDataColumn
  • QAccordion_ActivateEvent
  • QAccordion_BeforeActivateEvent
  • QAccordion_CreateEvent
  • QAjaxResponse
  • QApplication
  • QApplicationBase
  • QArchive
  • QAutocomplete_ChangeEvent
  • QAutocomplete_CloseEvent
  • QAutocomplete_CodeGenerator
  • QAutocomplete_CreateEvent
  • QAutocomplete_FocusEvent
  • QAutocomplete_OpenEvent
  • QAutocomplete_ResponseEvent
  • QAutocomplete_SearchEvent
  • QAutocomplete_SelectEvent
  • QAutocomplete_SourceEvent
  • QAutocompleteBase_CodeGenerator
  • QAutocompleteListItem
  • QBaseClass
  • QBorderCollapse
  • QBorderStyle
  • QBrowserType
  • QCache
  • QCacheDeleteAction
  • QCacheDeleteAllAction
  • QCacheProviderAPC
  • QCacheProviderLocalMemory
  • QCacheProviderMemcache
  • QCacheProviderNoCache
  • QCacheProviderProxy
  • QCacheSetAction
  • QCalendarType
  • QCallType
  • QCausesValidation
  • QCheckBox_CodeGenerator
  • QCheckBoxBase_CodeGenerator
  • QCheckBoxList_CodeGenerator
  • QCheckBoxListBase_CodeGenerator
  • QControl_CodeGenerator
  • QControlBase_CodeGenerator
  • QControlCategoryType
  • QControlProxy
  • QCrossScripting
  • QCryptography
  • QCss
  • QCursor
  • QDatabaseFieldBase
  • QDatabaseResultBase
  • QDataGrid_CodeGenerator
  • QDataGridBase_CodeGenerator
  • QDatepicker_BeforeShowDayEvent
  • QDatepicker_BeforeShowEvent
  • QDatepicker_CalculateWeekEvent
  • QDatepicker_ChangeMonthYearEvent
  • QDatepicker_CloseEvent
  • QDatepicker_SelectEvent
  • QDatepicker_SelectEvent2
  • QDatepickerBox_BeforeShowDayEvent
  • QDatepickerBox_BeforeShowEvent
  • QDatepickerBox_CalculateWeekEvent
  • QDatepickerBox_ChangeMonthYearEvent
  • QDatepickerBox_CloseEvent
  • QDatepickerBox_CodeGenerator
  • QDatepickerBox_SelectEvent
  • QDatepickerBoxBase_CodeGenerator
  • QDateTime
  • QDateTimePicker_CodeGenerator
  • QDateTimePickerBase_CodeGenerator
  • QDateTimePickerFormat
  • QDateTimePickerType
  • QDateTimeSpan
  • QDbBackedFormStateHandler
  • QDialog_BeforeCloseEvent
  • QDialog_ButtonEvent
  • QDialog_CloseEvent
  • QDialog_CreateEvent
  • QDialog_DragEvent
  • QDialog_DragStartEvent
  • QDialog_DragStopEvent
  • QDialog_FocusEvent
  • QDialog_OpenEvent
  • QDialog_ResizeEvent
  • QDialog_ResizeStartEvent
  • QDialog_ResizeStopEvent
  • QDisplayStyle
  • QDraggable_CreateEvent
  • QDraggable_DragEvent
  • QDraggable_StartEvent
  • QDraggable_StopEvent
  • QDroppable_ActivateEvent
  • QDroppable_CreateEvent
  • QDroppable_DeactivateEvent
  • QDroppable_DropEvent
  • QDroppable_OutEvent
  • QDroppable_OverEvent
  • QEmailAttachment
  • QEmailMessage
  • QEmailServer
  • QEmailStringAttachment
  • QErrorAttribute
  • QFile
  • QFileAssetType
  • QFileFormStateHandler
  • QFloatTextBox_CodeGenerator
  • QFloatTextBoxBase_CodeGenerator
  • QFolder
  • QFormGen
  • QFormStateHandler
  • QGridLines
  • QHListControl
  • QHorizontalAlign
  • QHtml
  • QHtmlReporter
  • QHtmlTable_CodeGenerator
  • QHtmlTableCallableColumn
  • QHtmlTableCheckBoxColumn
  • QHtmlTableCheckBoxColumn_ClickEvent
  • QHtmlTableIndexedColumn
  • QHtmlTableLinkColumn
  • QHtmlTableNodeColumn
  • QHtmlTablePropertyColumn
  • QI18n
  • QImageType
  • QInformixPdoDatabaseField
  • QInformixPdoDatabaseResult
  • QInformixPdoDatabaseRow
  • QInstallationValidationResult
  • QInstallationValidator
  • QIntegerTextBox_CodeGenerator
  • QIntegerTextBoxBase_CodeGenerator
  • QJqButton_CreateEvent
  • QJqCheckBox_CreateEvent
  • QJqRadioButton_CreateEvent
  • QJsClosure
  • QJsFunction
  • QJsNoQuoteKey
  • QJsParameterList
  • QJsPriority
  • QJsVarName
  • QLabel_CodeGenerator
  • QLabelBase_CodeGenerator
  • QLexer
  • QListBox_CodeGenerator
  • QListBoxBase_CodeGenerator
  • QListControl_CodeGenerator
  • QListControlBase_CodeGenerator
  • QMenu
  • QMenu_BlurEvent
  • QMenu_CreateEvent
  • QMenu_FocusEvent
  • QMenu_SelectEvent
  • QMimeType
  • QModelConnectorArgumentType
  • QModelConnectorCreateType
  • QModelConnectorEditDlg
  • QModelConnectorOptions
  • QModelConnectorParam
  • QMultiLevelCacheProvider
  • QMySqlDatabaseResult
  • QNoScriptAjaxAction
  • QOracleDatabaseField
  • QOracleDatabaseResult
  • QOrderedListType
  • QOverflow
  • QPartialQueryBuilder
  • QPdoDatabaseResult
  • QPgConditionILike
  • QPgConditionJsonContains
  • QPgQ
  • QPosition
  • QPostgreSqlPdoDatabaseField
  • QPostgreSqlPdoDatabaseResult
  • QPostgreSqlPdoDatabaseRow
  • QProgressbar_ChangeEvent
  • QProgressbar_CompleteEvent
  • QProgressbar_CreateEvent
  • QQ
  • QQAggregationClause
  • QQAssociationNode
  • QQAverage
  • QQClause
  • QQColumnNode
  • QQCondition
  • QQConditionAll
  • QQConditionAnd
  • QQConditionBetween
  • QQConditionComparison
  • QQConditionEqual
  • QQConditionExists
  • QQConditionGreaterOrEqual
  • QQConditionGreaterThan
  • QQConditionIn
  • QQConditionIsNotNull
  • QQConditionIsNull
  • QQConditionLessOrEqual
  • QQConditionLessThan
  • QQConditionLike
  • QQConditionLogical
  • QQConditionNone
  • QQConditionNot
  • QQConditionNotBetween
  • QQConditionNotEqual
  • QQConditionNotExists
  • QQConditionNotIn
  • QQConditionNotLike
  • QQConditionOr
  • QQCount
  • QQDistinct
  • QQExpand
  • QQExpandAsArray
  • QQExpandVirtualNode
  • QQFunctionNode
  • QQGroupBy
  • QQHavingClause
  • QQLimitInfo
  • QQMathNode
  • QQMaximum
  • QQMinimum
  • QQNamedValue
  • QQNode
  • QQNoParentNode
  • QQOrderBy
  • QQReverseReferenceNode
  • QQSelect
  • QQSubQueryCountNode
  • QQSubQueryNode
  • QQSubQuerySqlNode
  • QQSum
  • QQTableNode
  • QQuery
  • QQueryBuilder
  • QQueryExpansion
  • QQVirtualNode
  • QRadioButtonList_CodeGenerator
  • QRadioButtonListBase_CodeGenerator
  • QRegex
  • QRepeatDirection
  • QRequestMode
  • QResizable_CreateEvent
  • QResizable_ResizeEvent
  • QResizable_StartEvent
  • QResizable_StopEvent
  • QResizeHandleDirection
  • QRssCategory
  • QRssFeed
  • QRssImage
  • QRssItem
  • QSampleTranslation
  • QSelectable_CreateEvent
  • QSelectable_SelectedEvent
  • QSelectable_SelectingEvent
  • QSelectable_StartEvent
  • QSelectable_StopEvent
  • QSelectable_UnselectedEvent
  • QSelectable_UnselectingEvent
  • QSelectionMode
  • QSelectMenu_ChangeEvent
  • QSelectMenu_CloseEvent
  • QSelectMenu_CreateEvent
  • QSelectMenu_FocusEvent
  • QSelectMenu_OpenEvent
  • QSelectMenu_SelectEvent
  • QSessionFormStateHandler
  • QSlider_ChangeEvent
  • QSlider_CodeGenerator
  • QSlider_CreateEvent
  • QSlider_SlideEvent
  • QSlider_StartEvent
  • QSlider_StopEvent
  • QSliderBase_CodeGenerator
  • QSoapMethod
  • QSoapParameter
  • QSoapService
  • QSortable_ActivateEvent
  • QSortable_BeforeStopEvent
  • QSortable_ChangeEvent
  • QSortable_CreateEvent
  • QSortable_DeactivateEvent
  • QSortable_OutEvent
  • QSortable_OverEvent
  • QSortable_ReceiveEvent
  • QSortable_RemoveEvent
  • QSortable_SortEvent
  • QSortable_StartEvent
  • QSortable_StopEvent
  • QSortable_UpdateEvent
  • QSpinner
  • QSpinner_ChangeEvent
  • QSpinner_CreateEvent
  • QSpinner_SpinEvent
  • QSpinner_StartEvent
  • QSpinner_StopEvent
  • QSqLite3PdoDatabaseField
  • QSqLite3PdoDatabaseResult
  • QSqLite3PdoDatabaseRow
  • QStack
  • QString
  • QTabs_ActivateEvent
  • QTabs_BeforeActivateEvent
  • QTabs_BeforeLoadEvent
  • QTabs_CreateEvent
  • QTabs_LoadEvent
  • QTag
  • QTestForm
  • QTextAlign
  • QTextBox_CodeGenerator
  • QTextBoxBase_CodeGenerator
  • QTextMode
  • QTimer
  • QTranslationPoParser
  • QType
  • QUnorderedListStyle
  • QVerticalAlign
  • QVirtualAttributeColumn
  • QWatcher
  • QWatcherBase
  • QWatcherCache
  • QWatcherDB
  • QWatcherNone
  • SampleComposite
  • SelectForm

Interfaces

  • ICacheAction
  • QDataList_CodeGenerator_Interface
  • QTranslationBase

Traits

  • QDataBinder
  • QModelTrait

Exceptions

  • QCallerException
  • QCryptographyException
  • QDataBindException
  • QDateTimeNullException
  • QEmailException
  • QIndexOutOfRangeException
  • QInformixPdoDatabaseException
  • QInvalidCastException
  • QInvalidFormStateException
  • QOptimisticLockingException
  • QPdoDatabaseException
  • QPoParserException
  • QPostgreSqlPdoDatabaseException
  • QRemoteAdminDeniedException
  • QSqLite3PdoDatabaseException
  • QUndefinedMethodException
  • QUndefinedPrimaryKeyException
  • QUndefinedPropertyException

Functions

  • __database_check_error
  • _b
  • _indent
  • _nl
  • _p
  • _r
  • _t
  • _tp
  • _tr
  • array_trim
  • beginsWith
  • CamelCaseFromDash
  • CastToInt
  • DisplayMonospacedText
  • endsWith
  • GO_BACK
  • jq_anytime_gen
  • jq_control_gen
  • jq_inc_gen
  • jq_indent
  • PrintExplainStatement
  • PrintInstructions
  • QcubedHandleCodeGenParseError
  • QcubedHandleError
  • QcubedHandleException
  • QCubedShutdown
  • QDateTimeErrorHandler
  • trimOffEnd
  • trimOffFront
  • Overview
  • Package
  • Class

Class QDateTimeSpan

Class QDateTimeSpan: This class is used to calculate the time difference between two dates (including time)

QBaseClass
Extended by QDateTimeSpan
Located at includes/framework/QDateTimeSpan.class.php
Methods summary
public
# __construct( integer $intSeconds = 0 )

Constructor for the QDateTimeSpan class

Constructor for the QDateTimeSpan class

Parameters

$intSeconds
Number of seconds to set for this QDateTimeSpan
public boolean
# IsPositive( )

Checks if the current DateSpan is positive

Checks if the current DateSpan is positive

Returns

boolean
public boolean
# IsNegative( )

Checks if the current DateSpan is negative

Checks if the current DateSpan is negative

Returns

boolean
public boolean
# IsZero( )

Checks if the current DateSpan is zero

Checks if the current DateSpan is zero

Returns

boolean
public new
# Difference( QDateTimeSpan $dtsSpan )

Calculates the difference between this DateSpan and another DateSpan

Calculates the difference between this DateSpan and another DateSpan

Parameters

$dtsSpan

Returns

new
QDateTimeSpan
public
# SetFromQDateTime( QDateTime $dttFrom, QDateTime $dttTo )

Sets current QDateTimeSpan to the difference between two QDateTime objects

Sets current QDateTimeSpan to the difference between two QDateTime objects

Parameters

$dttFrom
$dttTo
public
# AddSeconds( integer $intSeconds )

Adds an amount of seconds to the current QDateTimeSpan

Adds an amount of seconds to the current QDateTimeSpan

Parameters

$intSeconds
public
# AddMinutes( integer $intMinutes )

Adds an amount of minutes to the current QDateTimeSpan

Adds an amount of minutes to the current QDateTimeSpan

Parameters

$intMinutes
public
# AddHours( integer $intHours )

Adds an amount of hours to the current QDateTimeSpan

Adds an amount of hours to the current QDateTimeSpan

Parameters

$intHours
public
# AddDays( integer $intDays )

Adds an amount of days to the current QDateTimeSpan

Adds an amount of days to the current QDateTimeSpan

Parameters

$intDays
public
# AddMonths( integer $intMonths )

Adds an amount of months to the current QDateTimeSpan

Adds an amount of months to the current QDateTimeSpan

Parameters

$intMonths
protected integer
# GetYears( )

Calculates the total whole years in the current QDateTimeSpan

Calculates the total whole years in the current QDateTimeSpan

Returns

integer
protected integer
# GetMonths( )

Calculates the total whole months in the current QDateTimeSpan

Calculates the total whole months in the current QDateTimeSpan

Returns

integer
protected integer
# GetDays( )

Calculates the total whole days in the current QDateTimeSpan

Calculates the total whole days in the current QDateTimeSpan

Returns

integer
protected integer
# GetHours( )

Calculates the total whole hours in the current QDateTimeSpan

Calculates the total whole hours in the current QDateTimeSpan

Returns

integer
protected integer
# GetMinutes( )

Calculates the total whole minutes in the current QDateTimeSpan

Calculates the total whole minutes in the current QDateTimeSpan

Returns

integer
public
# Add( QDateTimeSpan $dtsSpan )

Adds a QDateTimeSpan to current QDateTimeSpan

Adds a QDateTimeSpan to current QDateTimeSpan

Parameters

$dtsSpan
public
# Subtract( QDateTimeSpan $dtsSpan )

Subtracts a QDateTimeSpan to current QDateTimeSpan

Subtracts a QDateTimeSpan to current QDateTimeSpan

Parameters

$dtsSpan
public null|string
# SimpleDisplay( )

Returns the time difference in approximate duration e.g. "about 4 months" or "4 minutes"

Returns the time difference in approximate duration e.g. "about 4 months" or "4 minutes"

The QDateTime class uses this function in its 'Age' property accessor

Returns

null|string
protected array
# GetTimearray( )

Return an array of timeunints

Return an array of timeunints

Returns

array
of timeunits
public mixed
# __get( string $strName )

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

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

Parameters

$strName
Name of the property to get

Returns

mixed
the returned property

Throws

Exception|QCallerException

Overrides

QBaseClass::__get()
public mixed
# __set( string $strName, string $mixValue )

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

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

Parameters

$strName
Name of the property to set
$mixValue
New value of the property

Returns

mixed
the property that was set

Throws

Exception|QCallerException

Overrides

QBaseClass::__set()
Methods inherited from QBaseClass
OverrideAttributes(), __call()
Constants summary
integer SecondsPerYear

Number of seconds in an year

Number of seconds in an year

# 31556926
integer SecondsPerMonth

Number of seconds in a month (assuming 30 days in a month)

Number of seconds in a month (assuming 30 days in a month)

# 2592000
integer SecondsPerDay

Number of seconds per day

Number of seconds per day

# 86400
integer SecondsPerHour

Number of seconds in an hour

Number of seconds in an hour

# 3600
integer SecondsPerMinute

Number of seconds per minute

Number of seconds per minute

# 60
Properties summary
protected integer $intSeconds

Seconds variable which will be used to calculate the timespan

Seconds variable which will be used to calculate the timespan

#
Magic properties summary
public integer $Seconds

Number seconds which correspond to the time difference

public read-only integer $Years

Years in the calculated timespan

public read-only integer $Months

Months in the calculated timespan

public read-only integer $Days

Days in the calculated timespan

public read-only integer $Hours

Hours in the calculated timespan

public read-only integer $Minutes

Minutes in the calculated timespan

API documentation generated by ApiGen