pimappsupport/chinesecalendaralg/originalsrc/ChineseDate.cpp
branchRCL_3
changeset 12 38571fd2a704
equal deleted inserted replaced
5:42814f902fe6 12:38571fd2a704
       
     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 // Implementation of the TChineseDate class.
       
    15 // 
       
    16 //
       
    17 
       
    18 // User includes
       
    19 #include "calconv.h"
       
    20 
       
    21 
       
    22 //
       
    23 // Construction/Destruction
       
    24 //
       
    25 
       
    26 //------------------------------------------------------
       
    27 // Class:       TChineseDate
       
    28 // Function:    TChineseDate
       
    29 // Arguments:   None
       
    30 //
       
    31 // Comments:    Constructor
       
    32 //
       
    33 // Return:      None
       
    34 //------------------------------------------------------
       
    35 EXPORT_C TChineseDate::TChineseDate()
       
    36 	{
       
    37 	}
       
    38 
       
    39 
       
    40 //------------------------------------------------------
       
    41 // Class:       TChineseDate
       
    42 // Function:    operator==
       
    43 // Arguments:   const TChineseDate &
       
    44 //
       
    45 // Comments:    overloaded == operator
       
    46 //
       
    47 // Return:      TBool - ETrue if the TChineseDate classes
       
    48 //				are the same
       
    49 //------------------------------------------------------
       
    50 EXPORT_C TBool TChineseDate::operator==(const TChineseDate &aDate) const
       
    51 	{
       
    52 	TBool rtn = ETrue;
       
    53 
       
    54 	if(iCycle != aDate.iCycle)
       
    55 		{
       
    56 		rtn = EFalse;
       
    57 		}
       
    58 	if(iYear != aDate.iYear)
       
    59 		{
       
    60 		rtn = EFalse;
       
    61 		}
       
    62 	if(iMonth != aDate.iMonth)
       
    63 		{
       
    64 		rtn = EFalse;
       
    65 		}
       
    66 	if(iLeapMonth != aDate.iLeapMonth)
       
    67 		{
       
    68 		rtn = EFalse;
       
    69 		}
       
    70 	if(iDay != aDate.iDay)
       
    71 		{
       
    72 		rtn = EFalse;
       
    73 		}
       
    74 
       
    75 	return rtn;
       
    76 	}