SenDateUtils Class Reference

API published in: S60 3rd Ed

Link against: senutils.lib

Capability Information

Required Capabilities

NetworkServices ReadUserData WriteUserData


#include <sendateutils.h>

Detailed Description

This utility class provides static methods for conversions between Symbian class types and XSD time-date type.

Public Types

enum   { KXmlDateTimeMaxLength = 25 }

Static Public Member Functions

static IMPORT_C TTime  FromXmlDateTimeL (const TDesC8 &aXmlDateTime)
  Convert dateTime (from XML schema) to Symbian TTime.
static IMPORT_C void  ToXmlDateTimeUtf8L (TDes8 &aDest, const TTime &aSrc)
  Convert Symbian TTime to dateTime (from XML schema).

Member Enumeration Documentation

anonymous enum
 
Enumerator:
KXmlDateTimeMaxLength 

Member Function Documentation

static IMPORT_C TTime SenDateUtils::FromXmlDateTimeL const TDesC8 &  aXmlDateTime  )  [static]
 

Convert dateTime (from XML schema) to Symbian TTime.

A panic will occur if an attempt is made to set an invalid value for any of the fields. Panics: User 3 if illegal date. Leave codes: KErrUnderflow Not enough data given or negative values KErrOverflow Too big values for e.g. month KErrGeneral Invalid date structure No check is made upon the validity of the year.

Parameters:
aXmlDateTime  source datetime to convert from
Returns:
The returned time will be in UTC.
static IMPORT_C void SenDateUtils::ToXmlDateTimeUtf8L TDes8 &  aDest,
const TTime &  aSrc
[static]
 

Convert Symbian TTime to dateTime (from XML schema).

Leave codes: KErrOverflow target descriptor is less than KXmlDateTimeMaxLength (25 bytes)

Parameters:
aDest  (UTF8) result will be written here. It must be at least KXmlDateTimeMaxLength long.
TTime  in UTC.

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top