Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QMailTimeStamp Class Reference
[QtMessagingModule, QtPimModule]

The QMailTimeStamp class manages message time stamps. More...

    #include <QMailTimeStamp>

Public Functions

Static Public Members


Detailed Description

The QMailTimeStamp class manages message time stamps.

QMailTimeStamp provides functions for creating and manipulating the time stamps of messages. QMailTimeStamp can be created from time stamp strings, or from QDateTime objects. The time stamp information can be extracted in UTC time, local time, or as a formatted string.

QMailTimeStamp maintains the timezone information of a time stamp, so it can be used to convert time stamp information between UTC time and localized time values.

See also QDateTime and QMailMessage.


Member Function Documentation

QMailTimeStamp::QMailTimeStamp ()

Constructs a null QMailTimeStamp object. A null timestamp is invalid.

QMailTimeStamp::QMailTimeStamp ( const QString & timeText )

Constructs a QMailTimeStamp object by parsing timeText.

QMailTimeStamp::QMailTimeStamp ( const QDateTime & dateTime )

Constructs a QMailTimeStamp object from the given dateTime.

QMailTimeStamp::~QMailTimeStamp ()

Destroys a QMailTimeStamp object.

QMailTimeStamp QMailTimeStamp::currentDateTime ()   [static]

Returns a QMailTimeStamp object initialised to contain the current date and time, in the local time zone.

bool QMailTimeStamp::isNull () const

Returns true if the timestamp has not been initialized to contain a value.

bool QMailTimeStamp::isValid () const

Returns true if the timestamp is valid; otherwise returns false;

QDateTime QMailTimeStamp::toLocalTime () const

Returns a QDateTime containing the time stamp converted to the local time zone.

QString QMailTimeStamp::toString () const

Returns the time stamp information in a standardised format, as required by RFC 2822.

The format used is "day_name, day_of_month month_name year hours:minutes:seconds utc_offset". Day and month names are standard U.S. English abbreviations.

For example: "Wed, 17 May 2006 20:45:00 +0100".

QDateTime QMailTimeStamp::toUTC () const

Returns a QDateTime containing the time stamp in UTC time.

bool QMailTimeStamp::operator!= ( const QMailTimeStamp & other ) const

Returns true if this time stamp is different from other; otherwise returns false.

Two time stamps are different if either the date, the time, or the time zone components are different.

See also operator==().

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

Returns true if this time stamp is earlier than other; otherwise returns false.

bool QMailTimeStamp::operator<= ( const QMailTimeStamp & other ) const

Returns true if this time stamp is earlier than or equal to other; otherwise returns false.

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

Returns true if this time stamp is equal to other; otherwise returns false.

See also operator!=().

bool QMailTimeStamp::operator> ( const QMailTimeStamp & other ) const

Returns true if this time stamp is later than other; otherwise returns false.

bool QMailTimeStamp::operator>= ( const QMailTimeStamp & other ) const

Returns true if this time stamp is later than or equal to other; otherwise returns false.


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3