Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License
"Eclipse Public License v1.0" which accompanies this distribution,
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
Nokia Corporation - initial contribution.
Contributors:
-->
<!DOCTYPE concept
PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-06730728-30C5-51FD-BD37-FB62F2958D28" xml:lang="en"><title>Calendar Conversion Overview</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>This topic describes date conversion between Gregorian and Chinese
calendars. </p>
<section id="GUID-E818CDBE-DCD5-4893-8CC9-8C123A6B0BD6"><title>Download</title> <p>Click on the following link to
download the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-1d985cd3-8a52-41ae-b048-fdc92b4152a7.zip" scope="external">Calcon.zip</xref></p><p>Click: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-1d985cd3-8a52-41ae-b048-fdc92b4152a7.html" scope="peer">browse</xref> to view the example code. </p> </section>
<section id="GUID-43D5CCC3-E22F-4FA2-93CE-E453FE476B2E"><title>Architectural Relationships</title> <p>The <xref href="GUID-13A9DD2B-8ABC-3D62-B54E-4F5DD5B9228B.dita"><apiname>TDateTime</apiname></xref> class is used to represent the Gregorian calendar
date. The class <xref href="GUID-FD63BD10-1C14-39DF-8B3A-5D76C0DFAFDD.dita"><apiname>TChineseDate</apiname></xref> is used to represent
the Chinese calendar date. <xref href="GUID-2F253853-79EB-316F-9E8D-D54AC6DDE06C.dita"><apiname>CChineseCalendarConverter</apiname></xref> is used for conversion in either direction between a Gregorian date
and a Chinese date. </p> <p>The <codeph>CChineseCalendarConverter</codeph> interface is implemented by a separate plug-in, which is not provided
by this component. If the plug-in is not available the interface returns
an error. </p> </section>
<section id="GUID-D2ADF59A-2FA7-4A0E-BE6C-93D90D8B688C"><title>Description</title> <p>The API consists of two calendar
classes: <xref href="GUID-13A9DD2B-8ABC-3D62-B54E-4F5DD5B9228B.dita"><apiname>TDateTime</apiname></xref> and <xref href="GUID-2F253853-79EB-316F-9E8D-D54AC6DDE06C.dita"><apiname>CChineseCalendarConverter</apiname></xref>, which converts between <xref href="GUID-13A9DD2B-8ABC-3D62-B54E-4F5DD5B9228B.dita"><apiname>TDateTime</apiname></xref> and <xref href="GUID-FD63BD10-1C14-39DF-8B3A-5D76C0DFAFDD.dita"><apiname>TChineseDate</apiname></xref> formats in both directions. Chinese dates
are calculated using the -2636 epoch. This is equivalent to 2637 BCE
(Before Common Era). </p> </section>
<section id="GUID-B2E86B04-433D-4C98-9839-28B9AF6D1B2C"><title>Class summary</title> <ul>
<li id="GUID-A8C05086-F2E1-5501-8261-36CA12C09B78"><p> <xref href="GUID-2F253853-79EB-316F-9E8D-D54AC6DDE06C.dita"><apiname>CChineseCalendarConverter</apiname></xref> </p> </li>
<li id="GUID-ACAE410D-F7E9-51F8-A3AC-E739750307C4"><p> <xref href="GUID-BE7D196E-357B-36BE-80BB-CCBBE00DFA90.dita#GUID-BE7D196E-357B-36BE-80BB-CCBBE00DFA90/GUID-71BB17B0-A0A1-30BA-B1B5-B075E8320942"><apiname>ESock::TDateTime</apiname></xref> </p> </li>
<li id="GUID-D13CA6CB-B67C-5B8E-BD39-9D148424AB3A"><p> <xref href="GUID-FD63BD10-1C14-39DF-8B3A-5D76C0DFAFDD.dita"><apiname>TChineseDate</apiname></xref> </p> </li>
</ul> </section>
</conbody></concept>