equal
deleted
inserted
replaced
|
1 // Copyright (c) 2000-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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __CALENDAR_H__ |
|
17 #define __CALENDAR_H__ |
|
18 |
|
19 #include <e32std.h> |
|
20 #include <e32def.h> |
|
21 |
|
22 |
|
23 const TInt KCalConvDayOffsetByOne = 1; |
|
24 const TInt KCalConvMonthOffsetByOne = 1; |
|
25 const TInt KCalConvYearOffsetByOne = 1; |
|
26 const TReal KCalConvPointFive = 0.5; |
|
27 |
|
28 |
|
29 class TCalendar |
|
30 { |
|
31 public: |
|
32 TCalendar(); |
|
33 IMPORT_C TCalendar& operator=(const TCalendar& aTCal); |
|
34 IMPORT_C TReal JulianDay(); |
|
35 |
|
36 protected: |
|
37 void Round(TInt& aRes, TReal& aNum) const; |
|
38 void Mod(TReal& aRes, const TReal& aAbscissa, const TReal& aDenominator) const; |
|
39 void Amod(TReal& aRes, const TReal& aAbscissa, const TReal& aDenominator) const; |
|
40 void Floor(TInt& aRes, const TReal& aNum) const; |
|
41 void Ceiling(TInt& aRes, const TReal& aNum) const; |
|
42 |
|
43 protected: |
|
44 TReal iStartEpoch; |
|
45 TInt iDaysInNormYear; |
|
46 TReal iJulianDay; |
|
47 TInt iCycle; |
|
48 TInt iLeaps; |
|
49 TInt iOffset; |
|
50 TInt iStdYearMonth; |
|
51 }; |
|
52 |
|
53 |
|
54 #endif |