SenDateUtils Class Reference

#include <mw/SenDateUtils.h>

Link against: SenUtils.lib

class SenDateUtils
Public Member Enumerations
enumanonymous { KXmlDateTimeMaxLength }
Public Member Functions
IMPORT_C TTimeFromXmlDateTimeL(const TDesC8 &)
IMPORT_C voidToXmlDateTimeUtf82L(TDes8 &, const TTime &)
IMPORT_C voidToXmlDateTimeUtf8L(TDes8 &, const TTime &)

Detailed Description

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

Member Enumeration Documentation

Enum anonymous

EnumeratorValueDescription
KXmlDateTimeMaxLength31

Member Function Documentation

FromXmlDateTimeL ( const TDesC8 & )

IMPORT_C TTimeFromXmlDateTimeL(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.
Since
Series60 3.0
ParameterDescription
aXmlDateTimesource datetime to convert from

Returns: The returned time will be in UTC.

ToXmlDateTimeUtf82L ( TDes8 &, const TTime & )

IMPORT_C voidToXmlDateTimeUtf82L(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)
Since
Series60 5.0
ParameterDescription
aDest(UTF8) result will be written here. It must be at least KXmlDateTimeMaxLength long.

ToXmlDateTimeUtf8L ( TDes8 &, const TTime & )

IMPORT_C voidToXmlDateTimeUtf8L(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)
Since
Series60 3.0
ParameterDescription
aDest(UTF8) result will be written here. It must be at least KXmlDateTimeMaxLength long.