org.kde.koala

Class KRFCDate

public class KRFCDate extends Object implements QtSupport

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

Author: Waldo Bastian

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

Constructor Summary
protected KRFCDate(Class dummy)
KRFCDate()
Method Summary
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
booleanisDisposed()
Has the wrapped C++ instance been deleted?
static intlocalUTCOffset()
Returns the local timezone offset to UTC in minutes
static intparseDate(String date)
This function tries to parse a string containing a date/time in any of the formats specified by RFC822, RFC850, RFC1036, RFC1123 and RFC2822.
static intparseDateISO8601(String date)
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.
static Stringrfc2822DateString(int utcTime, int utcOffset)
Returns a string representation of the given date and time formated in conformance to RFC2822.
static Stringrfc2822DateString(int utcTime)
Returns a string representation of the given date and time formated in conformance to RFC2822.

Constructor Detail

KRFCDate

protected KRFCDate(Class dummy)

KRFCDate

public KRFCDate()

Method Detail

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

finalize

protected void finalize()
Deletes the wrapped C++ instance

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

localUTCOffset

public static int localUTCOffset()
Returns the local timezone offset to UTC in minutes

Returns: the local timezone offset in minutes

UNKNOWN: Returns the local timezone offset to UTC in minutes

parseDate

public static int parseDate(String date)
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.

Parameters: date the date to parse

Returns: the date, or 0 if not possible

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

parseDateISO8601

public static int parseDateISO8601(String date)
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.

Parameters: date the date to parse

Returns: the date, or 0 if not possible

UNKNOWN: This function tries to parse a string containing a date/time in any of the formats specified by http://www.

rfc2822DateString

public static String rfc2822DateString(int utcTime, int utcOffset)
Returns a string representation of the given date and time formated in conformance to RFC2822.

Parameters: utcTime a date and time in UTC utcOffset the offset to UTC in minutes

Returns: the string representation of the date

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

rfc2822DateString

public static String rfc2822DateString(int utcTime)
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: utcTime a date and time in UTC

Returns: the string representation of the date

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