First public contribution.
1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // This file contains the definition of internal classes used to parse TInternetDate data
19 @file tinternetdateparser.h
23 #ifndef __TINTERNETDATEPARSER_H__
24 #define __TINTERNETDATEPARSER_H__
29 Used as a support class of TInternetDate. This provides the implementation of parsing
31 Supports parsing of the following date formats:
32 Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123
33 Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036
34 Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
36 All dates are store relative to Universal Time and not local time.
41 class TInternetDateParser
44 inline TInternetDateParser();
46 void ConvertFromInternetFormL(const TDesC8& aInternetTextDateTime, TDateTime& aDateTime);
48 HBufC8* ConvertToRfc1123FormL(const TDateTime& aDateTime);
51 void ConvertFromRfc1123And850FormL(const TDesC8& aRfc1123DateTime, TDateTime& aDateTime);
52 void ConvertFromAscTimeFormL(const TDesC8& aAscTimeDateTime, TDateTime& aDateTime);
53 TInt ParseRfcDateDayMonthYearL(const TDesC8& aDateTimeText, TDateTime& aDateTime);
54 TMonth GetMonthL(const TDesC8& aMonthText);
55 void ParseHHMMSSTimeL(const TDesC8& aDateTimeText, TDateTime& aDateTime);
56 void ParseTimeOffsetL(const TDesC8& aTimeOffset, TTimeIntervalMinutes& aOffsetMinutes);
57 void ParseHHMMTimeOffsetL(const TDesC8& aTimeOffset, TTimeIntervalMinutes& aOffsetMinutes);
61 inline TInternetDateParser::TInternetDateParser()
66 #endif // __TINTERNETDATEPARSER_H__