TInternetDate Class Reference

#include <tinternetdate.h>

class TInternetDate
Public Member Enumerations
enumTInternetDateFormat { ERfc1123Format }
Public Member Functions
TInternetDate()
TInternetDate(TDateTime)
IMPORT_C const TDateTime &DateTime()
IMPORT_C HBufC8 *InternetDateTimeL(TInternetDateFormat)
IMPORT_C voidSetDateL(const TDesC8 &)

Detailed Description

Stores dates in universal time and provides parsing of internet style dates into TDateTime and RFC 1123 (updates RFC 822) dates.

Supports parsing of the following date formats: Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036 Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format

In case of Date Formats with offsets "Mon, 21 Jan 2002 23:00:00 +0210" , equivalent time in UTC can be determined by substracting the offset from the local time (RFC 3339).

All dates are store relative to Universal Time and not local time.

Since
7.0

Member Enumeration Documentation

Enum TInternetDateFormat

Enum defining internet date formats.
Since
9.1
EnumeratorValueDescription
ERfc1123Format

Rfc 1123 Compliant date format

Constructor & Destructor Documentation

TInternetDate ( )

TInternetDate()[inline]

Intended Usage: Default Constructor. Used when setting dates that are in a text format using SetDateL

Since
7.0 .

TInternetDate ( TDateTime )

TInternetDate(TDateTimeaUniversalTime)[inline]

Intended Usage: Constructor. Used when setting a date that you later want parsed into an internet text format

Since
7.0
Parameters
aUniversalTimea time that should correspond to Universal Time.

Member Function Documentation

DateTime ( )

IMPORT_C const TDateTime &DateTime()

Used to access the date/time

Since
7.0
Return Value
const TDateTime& The time stored in this object

InternetDateTimeL ( TInternetDateFormat )

IMPORT_C HBufC8 *InternetDateTimeL(TInternetDateFormataInternetDateFormat)

Used to access the date/time in a text formate

Since
7.0
Parameters
aInternetDateFormatThe format of the date. Only RFC1123 dates are supported
Return Value
HBufC8* A descriptor containing the date/time in the format specifed by the parameter aInternetDateFormat
Leave Codes
KErrNoMemory

SetDateL ( const TDesC8 & )

IMPORT_C voidSetDateL(const TDesC8 &aDate)

Used to set a date which is in a Internet form.

Since
7.0
Parameters
aDatethe text form of the date .
Leave Codes
KErrCorrupt,if the date is not in the correct format