Search for usage in LXR

KDbDateTime Class Reference

#include <KDbDateTime.h>

Public Member Functions

 KDbDateTime ()
 KDbDateTime (const KDbDate &date, const KDbTime &time)
KDbDate date () const
bool isNull () const
bool isValid () const
bool operator!= (const KDbDateTime &other) const
bool operator< (const KDbDateTime &other) const
bool operator<= (const KDbDateTime &other) const
bool operator== (const KDbDateTime &other) const
bool operator> (const KDbDateTime &other) const
bool operator>= (const KDbDateTime &other) const
KDbTime time () const
QDateTime toQDateTime () const
QByteArray toString () const

Detailed Description

Generic date/time constant.


Definition at line 403 of file KDbDateTime.h.

Constructor & Destructor Documentation

◆ KDbDateTime()

KDbDateTime::KDbDateTime ( )

Constructs a null date/time.

Definition at line 413 of file KDbDateTime.h.

Member Function Documentation

◆ date()

KDbDate KDbDateTime::date ( ) const

Returns the date part of the date/time.

Definition at line 460 of file KDbDateTime.h.

◆ isNull()

bool KDbDateTime::isNull ( ) const

Returns true if the date/time is null.

A time is null if its date or time is null.

Definition at line 416 of file KDbDateTime.cpp.

◆ isValid()

bool KDbDateTime::isValid ( ) const

Returns true if the date/time is valid.

Validation is performed by converting to QDateTime (toQDateTime()) and checking if it is valid.

Definition at line 411 of file KDbDateTime.cpp.

◆ time()

KDbTime KDbDateTime::time ( ) const

Returns the time part of the date/time.

Definition at line 465 of file KDbDateTime.h.

◆ toQDateTime()

QDateTime KDbDateTime::toQDateTime ( ) const

Returns the date/time converted to QDateTime value.

Invalid QDateTime is returned if the KDbDateTime is invalid.

Definition at line 421 of file KDbDateTime.cpp.

◆ toString()

QByteArray KDbDateTime::toString ( ) const

Returns the date/time value converted to string even if it is invalid.

For null date/times empty string is returned.

Definition at line 426 of file KDbDateTime.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 28 2023 04:06:13 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.