using System;
namespace CNCalendar
{
public class CNDate
{
private const ushort START_YEAR = 1901;
private const ushort END_YEAR = 2050;
private string[] ConstellationName =
{
"白羊座", "金牛座", "雙子座",
"巨蟹座", "獅子座", "處女座",
"天秤座", "天蠍座", "射手座",
"摩羯座", "水瓶座", "雙魚座"};
private string[] LunarHolDayName =
{
"小寒", "大寒", "立春", "雨水",
"驚蟄", "春分", "清明", "谷雨",
"立夏", "小滿", "芒種", "夏至",
"小暑", "大暑", "立秋", "處暑",
"白露", "秋分", "寒露", "霜降",
"立冬", "小雪", "大雪", "冬至"};
//數組gLunarDay存入陰歷1901年到2100年每年中的月天數信息,
//陰歷每月只能是29或30天,一年用12(或13)個二進制位表示,對應位為1表30天,否則為29天
private int[] gLunarMonthDay = {
//測試數據只有1901.1.1 --2050.12.31
0x4ae0, 0xa570, 0x5268, 0xd260, 0xd950, 0x6aa8, 0x56a0, 0x9ad0, 0x4ae8, 0x4ae0, //1910
0xa4d8, 0xa4d0, 0xd250, 0xd548, 0xb550, 0x56a0, 0x96d0, 0x95b0, 0x49b8, 0x49b0, //1920
0xa4b0, 0xb258, 0x6a50, 0x6d40, 0xada8, 0x2b60, 0x9570, 0x4978, 0x4970, 0x64b0, //1930
0xd4a0, 0xea50, 0x6d48, 0x5ad0, 0x2b60, 0x9370, 0x92e0, 0xc968, 0xc950, 0xd4a0, //1940
0xda50, 0xb550, 0x56a0, 0xaad8, 0x25d0, 0x92d0, 0xc958, 0xa950, 0xb4a8, 0x6ca0, //1950
0xb550, 0x55a8, 0x4da0, 0xa5b0, 0x52b8, 0x52b0, 0xa950, 0xe950, 0x6aa0, 0xad50, //1960
0xab50, 0x4b60, 0xa570, 0xa570, 0x5260, 0xe930, 0xd950, 0x5aa8, 0x56a0, 0x96d0, //1970