|
1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Calendar Lunar Plugin |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #include "calendarui_debug.h" |
|
21 #include "calenlunarinfo.h" |
|
22 |
|
23 // ----------------------------------------------------------------------------- |
|
24 // TCalenLunarInfo::HasFestival |
|
25 // ----------------------------------------------------------------------------- |
|
26 // |
|
27 TBool TCalenLunarInfo::HasFestival() |
|
28 { |
|
29 TRACE_ENTRY_POINT; |
|
30 |
|
31 TRACE_EXIT_POINT; |
|
32 return iFestival >= 0; |
|
33 } |
|
34 |
|
35 // ----------------------------------------------------------------------------- |
|
36 // TCalenLunarInfo::HasSolarTerm |
|
37 // ----------------------------------------------------------------------------- |
|
38 // |
|
39 TBool TCalenLunarInfo::HasSolarTerm() |
|
40 { |
|
41 TRACE_ENTRY_POINT; |
|
42 |
|
43 TRACE_EXIT_POINT; |
|
44 return iSolarTerm >= 0; |
|
45 } |
|
46 |
|
47 // ----------------------------------------------------------------------------- |
|
48 // TCalenLunarInfo::AnimalYear |
|
49 // ----------------------------------------------------------------------------- |
|
50 // |
|
51 |
|
52 EXPORT_C TCalenLunarInfo::TAnimalYear TCalenLunarInfo::AnimalYear() |
|
53 { |
|
54 TRACE_ENTRY_POINT; |
|
55 |
|
56 ASSERT( EYearOfRat < EYearOfPig ); |
|
57 ASSERT( EYearOfRat <= iTerrestialBranch ); |
|
58 ASSERT( iTerrestialBranch <= EYearOfPig ); |
|
59 |
|
60 // Ordering is same for animal years and terrestial branches |
|
61 TRACE_EXIT_POINT; |
|
62 return static_cast<TCalenLunarInfo::TAnimalYear>( iTerrestialBranch ); |
|
63 } |