KDbDateTime

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.

Since
3.2.0

Definition at line 403 of file KDbDateTime.h.

Constructor & Destructor Documentation

◆ KDbDateTime() [1/2]

KDbDateTime::KDbDateTime ( const KDbDate & date,
const KDbTime & time )
inline

Definition at line 406 of file KDbDateTime.h.

◆ KDbDateTime() [2/2]

KDbDateTime::KDbDateTime ( )
inline

Constructs a null date/time.

Definition at line 413 of file KDbDateTime.h.

Member Function Documentation

◆ date()

KDbDate KDbDateTime::date ( ) const
inline

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.

◆ operator!=()

bool KDbDateTime::operator!= ( const KDbDateTime & other) const
inline

Definition at line 419 of file KDbDateTime.h.

◆ operator<()

bool KDbDateTime::operator< ( const KDbDateTime & other) const

Definition at line 406 of file KDbDateTime.cpp.

◆ operator<=()

bool KDbDateTime::operator<= ( const KDbDateTime & other) const
inline

Definition at line 423 of file KDbDateTime.h.

◆ operator==()

bool KDbDateTime::operator== ( const KDbDateTime & other) const

Definition at line 401 of file KDbDateTime.cpp.

◆ operator>()

bool KDbDateTime::operator> ( const KDbDateTime & other) const
inline

Definition at line 427 of file KDbDateTime.h.

◆ operator>=()

bool KDbDateTime::operator>= ( const KDbDateTime & other) const
inline

Definition at line 425 of file KDbDateTime.h.

◆ time()

KDbTime KDbDateTime::time ( ) const
inline

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-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:11:02 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.