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 QDateTime

QDateTime This DateTime class provides a nice wrapper around the PHP DateTime class, which is included with all versions of PHP >= 5.2.0. It includes many enhancements, including the ability to specify a null date or time portion to represent a date only or time only object. Inherits from the php DateTime object, and the built-in methods are available for you to call as well. In particular, note that the built-in format, and the qFormat routines here take different specifiers. Feel free to use either.

DateTime implements DateTimeInterface
Extended by QDateTime implements JsonSerializable
Located at includes/framework/QDateTime.class.php
Methods summary
public static QDateTime
# Now( boolean $blnTimeValue = true )

Returns a new QDateTime object that's set to "Now" Set blnTimeValue to true (default) for a DateTime, and set blnTimeValue to false for just a Date

Returns a new QDateTime object that's set to "Now" Set blnTimeValue to true (default) for a DateTime, and set blnTimeValue to false for just a Date

Parameters

$blnTimeValue
whether or not to include the time value

Returns

QDateTime
the current date and/or time
public static string
# NowToString( string|null $strFormat = null )

Return Now as a string. Uses the default datetime format if none speicifed.

Return Now as a string. Uses the default datetime format if none speicifed.

Parameters

$strFormat

Returns

string
public boolean
# IsDateNull( )

Returns

boolean
public boolean
# IsNull( )

Returns

boolean
public boolean
# IsTimeNull( )

Returns

boolean
public string
# PhpDate( $strFormat )

Parameters

$strFormat

Returns

string
public array
# GetSoapDateTimeArray( QDateTime[] $dttArray )

Parameters

$dttArray

Returns

array
public static QDateTime
# FromTimestamp( integer $intTimestamp, DateTimeZone $objTimeZone = null )

Create from a unix timestamp. Improves over php by taking into consideration the timezone, so that the internal format is automatically converted to the internal timezone, or the default timezone.

Create from a unix timestamp. Improves over php by taking into consideration the timezone, so that the internal format is automatically converted to the internal timezone, or the default timezone.

Parameters

$intTimestamp
$objTimeZone

Returns

QDateTime
public
# __construct( null|integer|string|QDateTime|DateTime $mixValue = null, DateTimeZone $objTimeZone = null, integer $intType = QDateTime::UnknownType )

Construct a QDateTime. Does a few things differently than the php version: - Always stores timestamps in local or given timezone, so time extraction is easy - Has settings to determine if you want a date only or time only type - Will NOT throw exceptions. Errors simply result in a null datetime.

Construct a QDateTime. Does a few things differently than the php version: - Always stores timestamps in local or given timezone, so time extraction is easy - Has settings to determine if you want a date only or time only type - Will NOT throw exceptions. Errors simply result in a null datetime.

Parameters

$mixValue
$objTimeZone
$intType

Throws

QCallerException

Overrides

DateTime::__construct()
public static QDateTime
# LastDayOfTheMonth( integer $intMonth, integer $intYear )

Returns a new QDateTime object set to the last day of the specified month.

Returns a new QDateTime object set to the last day of the specified month.

Parameters

$intMonth
$intYear

Returns

QDateTime
the last day to a month in a year
public static QDateTime
# FirstDayOfTheMonth( integer $intMonth, integer $intYear )

Returns a new QDateTime object set to the first day of the specified month.

Returns a new QDateTime object set to the first day of the specified month.

Parameters

$intMonth
$intYear

Returns

QDateTime
the first day of the month
public string
# __toString( )

Formats a date as a string using the default format type.

Formats a date as a string using the default format type.

Returns

string
public
# __sleep( )
public
# __wakeup( )

Overrides

DateTime::__wakeup()
public string
# qFormat( string $strFormat = null )

Outputs the date as a string given the format strFormat. Will use the static defaults if none given.

Outputs the date as a string given the format strFormat. Will use the static defaults if none given.

Properties of strFormat are (using Sunday, March 2, 1977 at 1:15:35 pm in the following examples):

M - Month as an integer (e.g., 3) MM - Month as an integer with leading zero (e.g., 03) MMM - Month as three-letters (e.g., Mar) MMMM - Month as full name (e.g., March)

D - Day as an integer (e.g., 2) DD - Day as an integer with leading zero (e.g., 02) DDD - Day of week as three-letters (e.g., Wed) DDDD - Day of week as full name (e.g., Wednesday)

YY - Year as a two-digit integer (e.g., 77) YYYY - Year as a four-digit integer (e.g., 1977)

h - Hour as an integer in 12-hour format (e.g., 1) hh - Hour as an integer in 12-hour format with leading zero (e.g., 01) hhh - Hour as an integer in 24-hour format (e.g., 13) hhhh - Hour as an integer in 24-hour format with leading zero (e.g., 13)

mm - Minute as a two-digit integer

ss - Second as a two-digit integer

z - "pm" or "am" zz - "PM" or "AM" zzz - "p.m." or "a.m." zzzz - "P.M." or "A.M." ttt - Timezone Abbreviation as a three-letter code (e.g. PDT, GMT) tttt - Timezone Identifier (e.g. America/Los_Angeles)

Parameters

$strFormat
the format of the date

Returns

string
the formatted date as a string
public QDateTime
# setTime( integer|QDateTime $mixValue, integer|null $intMinute = null, integer|null $intSecond = null )

Sets the time portion to the given time. If a QDateTime is given, will use the time portion of that object. Works around a problem in php that if you set the time across a daylight savings time boundary, the timezone does not advance. This version will detect that and advance the timezone.

Sets the time portion to the given time. If a QDateTime is given, will use the time portion of that object. Works around a problem in php that if you set the time across a daylight savings time boundary, the timezone does not advance. This version will detect that and advance the timezone.

Parameters

$mixValue
$intMinute
$intSecond

Returns

QDateTime

Overrides

DateTime::setTime()
public
# setDate( integer $intYear, integer $intMonth, integer $intDay )

Set the date.

Set the date.

Parameters

$intYear
$intMonth
$intDay

Returns


$this|DateTime

Overrides

DateTime::setDate()
protected
# ReinforceNullProperties( )
public
# ConvertToTimezone( string $strTimezoneIdentifier )

Converts the current QDateTime object to a different TimeZone.

Converts the current QDateTime object to a different TimeZone.

TimeZone should be passed in as a string-based identifier.

Note that this is different than the built-in DateTime::SetTimezone() method which expicitly takes in a DateTimeZone object. QDateTime::ConvertToTimezone allows you to specify any string-based Timezone identifier. If none is specified and/or if the specified timezone is not a valid identifier, it will simply remain unchanged as opposed to throwing an exeception or error.

Parameters

$strTimezoneIdentifier
a string-based parameter specifying a timezone identifier (e.g. America/Los_Angeles)
public boolean
# IsEqualTo( QDateTime $dttCompare )

Returns true if give QDateTime is the same.

Returns true if give QDateTime is the same.

Parameters

$dttCompare

Returns

boolean
public boolean
# IsEarlierThan( QDateTime $dttCompare )

Returns true if current date time is earlier than the given one.

Returns true if current date time is earlier than the given one.

Parameters

$dttCompare

Returns

boolean
public boolean
# IsEarlierOrEqualTo( QDateTime $dttCompare )

Returns true if current date time is earlier than the given one.

Returns true if current date time is earlier than the given one.

Parameters

$dttCompare

Returns

boolean
public boolean
# IsLaterThan( QDateTime $dttCompare )

Returns true if current date time is later than the given one.

Returns true if current date time is later than the given one.

Parameters

$dttCompare

Returns

boolean
public boolean
# IsLaterOrEqualTo( QDateTime $dttCompare )

Returns true if current date time is later than or equal to the given one.

Returns true if current date time is later than or equal to the given one.

Parameters

$dttCompare

Returns

boolean
public integer
# Compare( QDateTime $dttCompare )

Compare the current date with the given date. Return -1 if current date is less than given date, 0 if equal, and 1 if greater. Null dates are considered the earliest possible date.

Compare the current date with the given date. Return -1 if current date is less than given date, 0 if equal, and 1 if greater. Null dates are considered the earliest possible date.

Parameters

$dttCompare

Returns

integer
public QDateTimeSpan
# Difference( QDateTime $dttDateTime )

Returns the difference as a QDateSpan, which is easier to work with and more full featured than the php DateTimeInterval class.

Returns the difference as a QDateSpan, which is easier to work with and more full featured than the php DateTimeInterval class.

Parameters

$dttDateTime

Returns

QDateTimeSpan
public QDateTime
# Add( DateInterval|QDateTimeSpan $dtsSpan )

Add a datespan or interval to the current date.

Add a datespan or interval to the current date.

Parameters

$dtsSpan

Returns

QDateTime

Throws

QCallerException
public QDateTime
# AddSeconds( integer $intSeconds )

Add a number of seconds. Use negative value to go earlier in time.

Add a number of seconds. Use negative value to go earlier in time.

Parameters

$intSeconds

Returns

QDateTime
public QDateTime
# AddMinutes( integer $intMinutes )

Add minutes to the time.

Add minutes to the time.

Parameters

$intMinutes

Returns

QDateTime
public QDateTime
# AddHours( integer $intHours )

Add hours to the time.

Add hours to the time.

Parameters

$intHours

Returns

QDateTime
public QDateTIme
# AddDays( integer $intDays )

Add days to the time.

Add days to the time.

Parameters

$intDays

Returns

QDateTIme
public QDateTime
# AddMonths( integer $intMonths )

Add months to the time. If the day on the new month is greater than the month will allow, the day is adjusted to be the last day of that month.

Add months to the time. If the day on the new month is greater than the month will allow, the day is adjusted to be the last day of that month.

Parameters

$intMonths

Returns

QDateTime
public QDateTime
# AddYears( integer $intYears )

Add years to the time.

Add years to the time.

Parameters

$intYears

Returns

QDateTime
public QDateTime
# Modify( string $mixValue )

Modifies the date or time based on values found int a string.

Modifies the date or time based on values found int a string.

Parameters

$mixValue

Returns

QDateTime

See

DateTime::modify()
public string
# toJsObject( )

Convert the object to a javascript object. This is code that if executed in javascript would produce a Date javascript object. Note that the date will be created in the browser's local timezone, so convert to the browser's timezone first if that is important for you.

Convert the object to a javascript object. This is code that if executed in javascript would produce a Date javascript object. Note that the date will be created in the browser's local timezone, so convert to the browser's timezone first if that is important for you.

Returns

string
public array|mixed;
# jsonSerialize( )

Returns a datetime in a way that it will pass through a json_encode and be decodalbe in qcubed.js. qcubed.unpackParams looks for this.

Returns a datetime in a way that it will pass through a json_encode and be decodalbe in qcubed.js. qcubed.unpackParams looks for this.

Returns

array|mixed;

Implementation of

JsonSerializable::jsonSerialize()
public QDateTime|string
# __get( $strName )

PHP magic method

PHP magic method

Parameters

$strName

Returns

QDateTime|string

Throws

QUndefinedPropertyException
public mixed
# __set( $strName, $mixValue )

PHP magic method

PHP magic method

Parameters

$strName
$mixValue

Returns

mixed

Throws

Exception|QCallerException|QDateTimeNullException|QInvalidCastException|QUndefinedPropertyException
Methods inherited from DateTime
__set_state(), add(), createFromFormat(), diff(), format(), getLastErrors(), getOffset(), getTimestamp(), getTimezone(), modify(), setISODate(), setTimestamp(), setTimezone(), sub()
Constants summary
string Now

Used to specify the time right now (used when creating new instances of this class)

Used to specify the time right now (used when creating new instances of this class)

# 'now'
string FormatIso

Date and time in ISO format

Date and time in ISO format

# 'YYYY-MM-DD hhhh:mm:ss'
string FormatIsoCompressed

Date and time in ISO compressed format

Date and time in ISO compressed format

# 'YYYYMMDDhhhhmmss'
string FormatDisplayDate

Format used for displaying short date

Format used for displaying short date

# 'MMM DD YYYY'
string FormatDisplayDateFull

Format used for displaying the full date

Format used for displaying the full date

# 'DDD, MMMM D, YYYY'
string FormatDisplayDateTime

Format used for displaying the short date and time

Format used for displaying the short date and time

# 'MMM DD YYYY hh:mm zz'
string FormatDisplayDateTimeFull

Format used for displaying the full date and time

Format used for displaying the full date and time

# 'DDDD, MMMM D, YYYY, h:mm:ss zz'
string FormatDisplayTime

Format to display only the time

Format to display only the time

# 'hh:mm:ss zz'
string FormatRfc822

Date and time format according to RFC 822

Date and time format according to RFC 822

# 'DDD, DD MMM YYYY hhhh:mm:ss ttt'
string FormatRfc5322

Date and time format according to RFC 5322

Date and time format according to RFC 5322

# 'DDD, DD MMM YYYY hhhh:mm:ss ttttt'
string FormatSoap

Format used to represent date for SOAP

Format used to represent date for SOAP

# 'YYYY-MM-DDThhhh:mm:ss'
integer UnknownType

Unknown type interpretation

Unknown type interpretation

# 0
integer DateOnlyType

Interpret as only date (used in QDateTimePicket and MySqli database type)

Interpret as only date (used in QDateTimePicket and MySqli database type)

# 1
integer TimeOnlyType

Interpret as only time (used in QDateTimePicket and MySqli database type)

Interpret as only time (used in QDateTimePicket and MySqli database type)

# 2
integer DateAndTimeType

Interpret as both date and type (used in QDateTimePicket and MySqli database type)

Interpret as both date and type (used in QDateTimePicket and MySqli database type)

# 3
Constants inherited from DateTime
ATOM, COOKIE, ISO8601, RFC1036, RFC1123, RFC2822, RFC3339, RFC822, RFC850, RSS, W3C
Properties summary
protected boolean $blnDateNull

true if date is null

true if date is null

# true
protected boolean $blnTimeNull

true if time is null, rather than just zero (beginning of day)

true if time is null, rather than just zero (beginning of day)

# true
public static string $DefaultFormat

The "Default" Display Format

The "Default" Display Format

# QDateTime::FormatDisplayDateTime
public static string $DefaultTimeFormat

The "Default" Display Format for Times

The "Default" Display Format for Times

# QDateTime::FormatDisplayTime
public static string $DefaultDateOnlyFormat

The "Default" Display Format for Dates with null times

The "Default" Display Format for Dates with null times

# QDateTime::FormatDisplayDate
protected $strSerializedData

The following code is a workaround for a PHP bug in 5.2 and greater (at least to 5.4).

The following code is a workaround for a PHP bug in 5.2 and greater (at least to 5.4).

#
protected $strSerializedTZ
#
Magic properties summary
public null|integer $Month
public null|integer $Day
public null|integer $Year
public null|integer $Hour
public null|integer $Minute
public null|integer $Second
public integer $Timestamp
public read-only string $Age

A string representation of the age relative to now.

public read-only QDateTime $LastDayOfTheMonth

A new QDateTime representing the last day of this date's month.

public read-only QDateTime $FirstDayOfTheMonth

A new QDateTime representing the first day of this date's month.

API documentation generated by ApiGen