This topic describes date conversion between Gregorian and Chinese calendars.
Click on the following link to download the example: Calcon.zip
Click: browse to view the example code.
The TDateTime
class is
used to represent the Gregorian calendar date. The class TChineseDate
is used to represent the Chinese calendar
date. CChineseCalendarConverter
is used for conversion
in either direction between a Gregorian date and a Chinese date.
The CChineseCalendarConverter
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.
The API consists of two calendar classes: TDateTime
and CChineseCalendarConverter
, which converts
between TDateTime
and TChineseDate
formats in both directions. Chinese dates are calculated using the
-2636 epoch. This is equivalent to 2637 BCE (Before Common Era).