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 __GREGORIANCALENDAR_H__ |
|
17 #define __GREGORIANCALENDAR_H__ |
|
18 |
|
19 #include "calendar.h" |
|
20 #include "arithmeticaldate.h" |
|
21 |
|
22 class TGregorianCalendar : public TCalendar |
|
23 { |
|
24 public: |
|
25 TGregorianCalendar(); |
|
26 TGregorianCalendar(TReal aJulianDay); |
|
27 void GregorianToDateTime(TDateTime& aDT); |
|
28 void GregFromJulianDay(TArithmeticalDate& aDate, TReal aJulianDay) const; |
|
29 TReal GregToJulianDay(const TArithmeticalDate& aYear) const; |
|
30 private: |
|
31 void InitMembers(); |
|
32 TInt DayNumber(const TArithmeticalDate& aDate) const; |
|
33 void CalcGregYear(TArithmeticalDate& aDate, TReal aJulianDay) const; |
|
34 TBool IsLeapYear(const TInt aYear) const; |
|
35 TInt GregDateDiff(const TArithmeticalDate aDate1, const TArithmeticalDate aDate2) const; |
|
36 TInt DayMonthInYear(const TInt) const; |
|
37 TInt DaysMonthsElapsed(const TInt) const; |
|
38 }; |
|
39 |
|
40 #endif |