class KRFCDate

The KRFCDate class contains functions related to the parsing of dates. More...

Definition#include <krfcdate.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Static Methods


Detailed Description

The KRFCDate class contains functions related to the parsing of dates.

time_t  parseDate (const QString &date)

parseDate

[static]

This function tries to parse a string containing a date/time in any of the formats specified by RFC822, RFC850, RFC1036, RFC1123 and RFC2822.

If the date/time could not be parsed, 0 is returned. If the parsed date is epoch, then epoch+1 is returned so that a valid date will not be confused with an improper date string.

The date/time returned is converted to UTC.

time_t  parseDateISO8601 (const QString &date)

parseDateISO8601

[static]

This function tries to parse a string containing a date/time in any of the formats specified by http://www.w3.org/TR/NOTE-datetime

This is a subset of the formats specified in ISO8601.

If the date/time could not be parsed, 0 is returned. If the parsed date is epoch, then epoch+1 is returned so that a valid date will not be confused with an improper date string.

The date/time returned is converted to UTC.

int  localUTCOffset ()

localUTCOffset

[static]

Returns the local timezone offset to UTC in minutes

QCString  rfc2822DateString (time_t utcTime, int utcOffset)

rfc2822DateString

[static]

Returns a string representation of the given date and time formated in conformance to RFC2822.

Parameters:
utcTimea date and time in UTC
utcOffsetthe offset to UTC in minutes

QCString  rfc2822DateString (time_t utcTime)

rfc2822DateString

[static]

Returns a string representation of the given date and time formated in conformance to RFC2822.

Provided for convenience, the function is equivalent to rfc2822DateString(t, localUTCOffset()).

Parameters:
utcTimea date and time in UTC