Fortune Telling Collection - Horoscope - Make a calendar manually
Make a calendar manually
Use the system;
Namespace CNCalendar
{
Public class CNDate
{
private const ushort START _ YEAR = 190 1;
private const ushort END _ YEAR = 2050;
Private string [] ConstellationName =
{
Aries, Taurus and Gemini,
Cancer, Leo, Virgo,
Libra, Scorpio, Sagittarius,
Capricorn, Aquarius and Pisces;
Private string [] LunarHolDayName =
{
"slight cold", "severe cold", "beginning of spring" and "rain",
Frightened, Vernal Equinox, Qingming, Grain Rain,
Long Summer, Xiaoman, Mangzhong, Summer Solstice,
"Little Summer", "Great Summer", "beginning of autumn" and "Early Summer",
White dew, autumnal equinox, cold dew and first frost,
Beginning of winter, Light Snow, Heavy Snow, Winter Solstice};
//An array of dates in a month from 190 1 to 2 100 is stored in the calendar of the calendar.
//The lunar month can only be 29 or 30 days, and a year is represented by 12 (or 13) binary number, corresponding to 1 being 30 days, otherwise it is 29 days.
private int[] gLunarMonthDay = {
//The test data is only1901.1-2050.12.438+0.
0x4ae0,0xa570,0x5268,0xd260,0xd950,0x6aa8,0x56a0,0x9ad0,0x4ae8,0x4ae0,// 19 10
0x4d 8,0x4d 0,0xd250,0xd548,0xb550,0x56a0,0x96d0,0x95b0,0x49b8,0x49b0,// 1920
0x4b 0,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
0x4ae8、0x4ad0、0x4d 0、0xd268、0xd250、0xd528、0xb540、0xb6a0、0x96d0、0x95b0、// 1980
0x49b0,0x4b 8,0x4b 0,0xb258,0x6a50,0x6d40,0xada0,0xab60,0x9370,0x4978,// 1990
0x4970、0x64b0、0x6a50、0xea50、0x6b28、0x5ac0、0xab60、0x9368、0x92e0、0xc960、//2000
0xd4a8、0xd4a0、0xda50、0x5aa8、0x56a0、0xaad8、0x25d0、0x92d0、0xc958、0xa950、//20 10
0xb4a0、0xb550、0xb550、0x55a8、0x4ba0、0xa5b0、0x52b8、0x52b0、0xa930、0x74a8、//2020
0x6aa0、0xad50、0x4da8、0x4b60、0x9570、0x4e 0、0xd260、0xe930、0xd530、0x5aa0、//2030
0x6b50、0x96d0、0x4ae8、0x4ad0、0x4d 0、0xd258、0xd250、0xd520、0xdaa0、0xb5a0、//2040
0x56d0,0x4ad8,0x49b0,0x4b 8,0x4b 0,0xaa50,0xb528,0x6d20,0xada0,0x55b 0 }; //2050
//The array gLanarMonth stores the lunar calendar 190 1 to the month of the leap month in 2050. If there is no such month, it is 0, and each byte is stored for two years.
byte[] gLunarMonth ={
0x00,0x50,0x04,0x00,0x20,// 19 10
0x60,0x05,0x00,0x20,0x70,// 1920
0x05,0x00,0x40,0x02,0x06,// 1930
0x00,0x50,0x03,0x07,0x00,// 1940
0x60,0x04,0x00,0x20,0x70,// 1950
0x05,0x00,0x30,0x80,0x06,// 1960
0x00,0x40,0x03,0x07,0x00,// 1970
0x50,0x04,0x08,0x00,0x60,// 1980
0x04,0,0x00,0x60,0x05,// 1990
0x00,0x30,0x80,0x05,0x00,//2000
0x40,0x02,0x07,0x00,0x50,//20 10
0x04、0x09、0x00、0x60、0x04、//2020
0x00、0x20、0x60、0x05、0x00、//2030
0x30、0xb0、0x06、0x00、0x50、//2040
0x02、0x07、0x00、0x50、0x 03 }; //2050
//Array gLanarHoliDay stores the solar calendar dates corresponding to the 24 solar terms every year.
//The solar calendar dates corresponding to the twenty-four solar terms are almost fixed, with an average distribution of twelve months.
// 1 February, March, April, May and June
//Slight cold, severe cold, beginning of spring, rain, fright, vernal equinox, Qingming, Grain Rain, long summer, small mango, summer solstice.
//July, August, September, 65438+1October165438+1October 65438+February
//Little Summer beginning of autumn Summer White Dew Autumn Equinox Cold Dew Early Frost beginning of winter Light Snow and Heavy Snow Winter Solstice
//**********************************
//There is no definite rule for solar terms, so we need to save tables to save space, so ....
//**********************************}
//Data format description:
//For example, the solar term of 190 1 year is
// 1 February March April May July August September 10 June 1 1 October 12 February
// 6, 2 1, 4, 19, 6, 2 1, 5, 2 1, 6,22, 6,22, 8, 23, 8, 24, 8, 24, 8, 24, 8, 23, 8, 22
// 9, 6, 1 1,4, 9, 6, 10,6, 9,7, 9,7, 7, 8, 7, 9, 7, 9, 7, 9, 7, 8, 7, 15
//The data in the first line above is the corresponding date of monthly solar terms, 15 minus the first solar term and 15 minus the second solar term.
//In this way, the data corresponding to two solar terms per month is less than 16, and one byte is stored every month, and the first solar term data is stored in the high and low places.
//The data of the second solar term can be obtained from the following table.
byte[] gLunarHolDay ={
0x96,0xB4,0x96,0xA6,0x97,0x97,0x78,0x79,0x79,0x69,0x78,0x77,// 190 1
0x96,0xA4,0x96,0x96,0x97,0x87,0x79,0x79,0x79,0x69,0x78,0x78,// 1902
0x96,0xA5,0x87,0x96,0x87,0x87,0x79,0x69,0x69,0x78,0x78,// 1903
0x86,0xA5,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x79,0x78,0x87,// 1904
0x96,0xB4,0x96,0xA6,0x97,0x97,0x78,0x79,0x79,0x69,0x78,0x77,// 1905
0x96,0xA4,0x96,0x96,0x97,0x97,0x79,0x79,0x79,0x69,0x78,0x78,// 1906
0x96,0xA5,0x87,0x96,0x87,0x87,0x79,0x69,0x69,0x78,0x78,// 1907
0x86,0xA5,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x69,0x78,0x87,// 1908
0x96,0xB4,0x96,0xA6,0x97,0x97,0x78,0x79,0x79,0x69,0x78,0x77,// 1909
0x96,0xA4,0x96,0x96,0x97,0x97,0x79,0x79,0x79,0x69,0x78,0x78,// 19 10
0x96,0xA5,0x87,0x96,0x87,0x87,0x79,0x69,0x69,0x78,0x78,// 19 1 1
0x86,0xA5,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x69,0x78,0x87,// 19 12
0x95,0xB4,0x96,0xA6,0x97,0x97,0x78,0x79,0x79,0x69,0x78,0x77,// 19 13
0x96,0xB4,0x96,0xA6,0x97,0x97,0x79,0x79,0x79,0x69,0x78,0x78,// 19 14
0x96,0xA5,0x97,0x96,0x97,0x87,0x79,0x79,0x69,0x69,0x78,0x78,// 19 15
0x96,0xA5,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x79,0x77,0x87,// 19 16
0x95,0xB4,0x96,0xA6,0x96,0x97,0x78,0x79,0x78,0x69,0x78,0x87,// 19 17
0x96,0xB4,0x96,0xA6,0x97,0x97,0x79,0x79,0x79,0x69,0x78,0x77,// 19 18
0x96,0xA5,0x97,0x96,0x97,0x87,0x79,0x79,0x69,0x69,0x78,0x78,// 19 19
0x96,0xA5,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x79,0x77,0x87,// 1920
0x95,0xB4,0x96,0xA5,0x96,0x97,0x78,0x79,0x78,0x69,0x78,0x87,// 192 1
0x96,0xB4,0x96,0xA6,0x97,0x97,0x79,0x79,0x79,0x69,0x78,0x77,// 1922
0x96,0xA4,0x96,0x96,0x97,0x87,0x79,0x79,0x69,0x69,0x78,0x78,// 1923
0x96,0xA5,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x79,0x77,0x87,// 1924
0x95,0xB4,0x96,0xA5,0x96,0x97,0x78,0x79,0x78,0x69,0x78,0x87,// 1925
0x96,0xB4,0x96,0xA6,0x97,0x97,0x78,0x79,0x79,0x69,0x78,0x77,// 1926
0x96,0xA4,0x96,0x96,0x97,0x87,0x79,0x79,0x79,0x69,0x78,0x78,// 1927
0x96、0xA5、0x96、0xA5、0x96、0x96、0x88、0x78、0x78、0x87、0x87、// 1928
0x95,0xB4,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x79,0x77,0x87,// 1929
0x96,0xB4,0x96,0xA6,0x97,0x97,0x78,0x79,0x79,0x69,0x78,0x77,// 1930
0x96,0xA4,0x96,0x96,0x97,0x87,0x79,0x79,0x79,0x69,0x78,0x78,// 193 1
0x96、0xA5、0x96、0xA5、0x96、0x96、0x88、0x78、0x78、0x87、0x87、// 1932
0x95,0xB4,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x69,0x78,0x87,// 1933
0x96,0xB4,0x96,0xA6,0x97,0x97,0x78,0x79,0x79,0x69,0x78,0x77,// 1934
0x96,0xA4,0x96,0x96,0x97,0x97,0x79,0x79,0x79,0x69,0x78,0x78,// 1935
0x96,0xA5,0x96,0xA5,0x96,0x96,0x88,0x78,0x78,0x78,0x87,0x87,// 1936
0x95,0xB4,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x69,0x78,0x87,// 1937
0x96,0xB4,0x96,0xA6,0x97,0x97,0x78,0x79,0x79,0x69,0x78,0x77,// 1938
0x96,0xA4,0x96,0x96,0x97,0x97,0x79,0x79,0x79,0x69,0x78,0x78,// 1939
0x96、0xA5、0x96、0xA5、0x96、0x96、0x88、0x78、0x78、0x87、0x87、// 1940
0x95,0xB4,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x69,0x78,0x87,// 194 1
0x96,0xB4,0x96,0xA6,0x97,0x97,0x78,0x79,0x79,0x69,0x78,0x77,// 1942
0x96,0xA4,0x96,0x96,0x97,0x97,0x79,0x79,0x79,0x69,0x78,0x78,// 1943
0x96,0xA5,0x96,0xA5,0xA6,0x96,0x88,0x78,0x78,0x87,0x87,// 1944
0x95,0xB4,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x79,0x77,0x87,// 1945
0x95,0xB4,0x96,0xA6,0x97,0x97,0x78,0x79,0x78,0x69,0x78,0x77,// 1946
0x96,0xB4,0x96,0xA6,0x97,0x97,0x79,0x79,0x79,0x69,0x78,0x78,// 1947
0x96,0xA5,0xA6,0xA5,0xA6,0x96,0x88,0x88,0x78,0x78,0x87,0x87,// 1948
0xA5,0xB4,0x96,0xA5,0x96,0x97,0x88,0x79,0x78,0x79,0x77,0x87,// 1949
0x95,0xB4,0x96,0xA5,0x96,0x97,0x78,0x79,0x78,0x69,0x78,0x77,// 1950
0x96,0xB4,0x96,0xA6,0x97,0x97,0x79,0x79,0x79,0x69,0x78,0x78,// 195 1
0x96,0xA5,0xA6,0xA5,0xA6,0x96,0x88,0x88,0x78,0x78,0x87,0x87,// 1952
0xA5,0xB4,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x79,0x77,0x87,// 1953
0x95,0xB4,0x96,0xA5,0x96,0x97,0x78,0x79,0x78,0x68,0x78,0x87,// 1954
0x96,0xB4,0x96,0xA6,0x97,0x97,0x78,0x79,0x79,0x69,0x78,0x77,// 1955
0x96,0xA5,0xA5,0xA5,0xA6,0x96,0x88,0x88,0x78,0x78,0x87,0x87,// 1956
0xA5,0xB4,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x79,0x77,0x87,// 1957
0x95,0xB4,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x69,0x78,0x87,// 1958
0x96,0xB4,0x96,0xA6,0x97,0x97,0x78,0x79,0x79,0x69,0x78,0x77,// 1959
0x96,0xA4,0xA5,0xA5,0xA6,0x96,0x88,0x88,0x88,0x78,0x87,0x87,// 1960
0xA5,0xB4,0x96,0xA5,0x96,0x96,0x88,0x78,0x78,0x87,0x87,// 196 1
0x96,0xB4,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x69,0x78,0x87,// 1962
0x96,0xB4,0x96,0xA6,0x97,0x97,0x78,0x79,0x79,0x69,0x78,0x77,// 1963
0x96,0xA4,0xA5,0xA5,0xA6,0x96,0x88,0x88,0x88,0x78,0x87,0x87,// 1964
0xA5,0xB4,0x96,0xA5,0x96,0x96,0x88,0x78,0x78,0x87,0x87,// 1965
0x95,0xB4,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x69,0x78,0x87,// 1966
0x96,0xB4,0x96,0xA6,0x97,0x97,0x78,0x79,0x79,0x69,0x78,0x77,// 1967
0x96,0xA4,0xA5,0xA5,0xA6,0xA6,0x88,0x88,0x88,0x78,0x87,0x87,// 1968
0xA5,0xB4,0x96,0xA5,0x96,0x96,0x88,0x78,0x78,0x87,0x87,// 1969
0x95,0xB4,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x69,0x78,0x87,// 1970
0x96,0xB4,0x96,0xA6,0x97,0x97,0x78,0x79,0x79,0x69,0x78,0x77,// 197 1
0x96,0xA4,0xA5,0xA5,0xA6,0xA6,0x88,0x88,0x88,0x78,0x87,0x87,// 1972
0xA5,0xB5,0x96,0xA5,0xA6,0x96,0x88,0x78,0x78,0x78,0x87,0x87,// 1973
0x95,0xB4,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x69,0x78,0x87,// 1974
0x96,0xB4,0x96,0xA6,0x97,0x97,0x78,0x79,0x78,0x69,0x78,0x77,// 1975
0x96,0xA4,0xA5,0xB5,0xA6,0xA6,0x88,0x89,0x88,0x78,0x87,0x87,// 1976
0xA5,0xB4,0x96,0xA5,0x96,0x96,0x88,0x88,0x78,0x78,0x87,0x87,// 1977
0x95,0xB4,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x79,0x78,0x87,// 1978
0x96,0xB4,0x96,0xA6,0x96,0x97,0x78,0x79,0x78,0x69,0x78,0x77,// 1979
0x96,0xA4,0xA5,0xB5,0xA6,0xA6,0x88,0x88,0x88,0x78,0x87,0x87,// 1980
0xA5,0xB4,0x96,0xA5,0xA6,0x96,0x88,0x88,0x78,0x78,0x77,0x87,// 198 1
0x95,0xB4,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x79,0x77,0x87,// 1982
0x95,0xB4,0x96,0xA5,0x96,0x97,0x78,0x79,0x78,0x69,0x78,0x77,// 1983
0x96,0xB4,0xA5,0xB5,0xA6,0xA6,0x87,0x88,0x88,0x78,0x87,0x87,// 1984
0xA5,0xB4,0xA6,0xA5,0xA6,0x96,0x88,0x88,0x78,0x78,0x87,0x87,// 1985
0xA5,0xB4,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x79,0x77,0x87,// 1986
0x95,0xB4,0x96,0xA5,0x96,0x97,0x88,0x79,0x78,0x69,0x78,0x87,// 1987
0x96,0xB4,0xA5,0xB5,0xA6,0xA6,0x87,0x88,0x88,0x78,0x87,0x86,// 1988
0xA5,0xB4,0xA5,0xA5,0xA6,0x96,0x88,0x88,0x88,0x78,0x87,0x87,// 1989
0xA5,0xB4,0x96,0xA5,0x96,0x96,0x88,0x78,0x78,0x79,0x77,0x87,// 1990
0x95,0xB4,0x96,0xA5,0x86,0x97,0x88,0x78,0x78,0x69,0x78,0x87,// 199 1
0x96,0xB4,0xA5,0xB5,0xA6,0xA6,0x87,0x88,0x88,0x78,0x87,0x86,// 1992
0xA5,0xB3,0xA5,0xA5,0xA6,0x96,0x88,0x88,0x88,0x78,0x87,0x87,// 1993
0xA5,0xB4,0x96,0xA5,0x96,0x96,0x88,0x78,0x78,0x87,0x87,// 1994
0x95,0xB4,0x96,0xA5,0x96,0x97,0x88,0x76,0x78,0x69,0x78,0x87,// 1995
0x96,0xB4,0xA5,0xB5,0xA6,0xA6,0x87,0x88,0x88,0x78,0x87,0x86,// 1996
0xA5,0xB3,0xA5,0xA5,0xA6,0xA6,0x88,0x88,0x88,0x78,0x87,0x87,// 1997
0xA5,0xB4,0x96,0xA5,0x96,0x96,0x88,0x78,0x78,0x87,0x87,// 1998
0x95,0xB4,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x69,0x78,0x87,// 1999
0x96,0xB4,0xA5,0xB5,0xA6,0xA6,0x87,0x88,0x88,0x78,0x87,0x86,//2000
0xA5,0xB3,0xA5,0xA5,0xA6,0xA6,0x88,0x88,0x88,0x78,0x87,0x87,//200 1
0xA5,0xB4,0x96,0xA5,0x96,0x96,0x88,0x78,0x78,0x87,0x87,//2002
0x95,0xB4,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x69,0x78,0x87,//2003
0x96,0xB4,0xA5,0xB5,0xA6,0xA6,0x87,0x88,0x88,0x78,0x87,0x86,//2004
0xA5,0xB3,0xA5,0xA5,0xA6,0xA6,0x88,0x88,0x88,0x78,0x87,0x87,//2005
0xA5,0xB4,0x96,0xA5,0xA6,0x96,0x88,0x88,0x78,0x78,0x87,0x87,//2006
0x95,0xB4,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x69,0x78,0x87,//2007
0x96,0xB4,0xA5,0xB5,0xA6,0xA6,0x87,0x88,0x87,0x78,0x87,0x86,//2008
0xA5,0xB3,0xA5,0xB5,0xA6,0xA6,0x88,0x88,0x88,0x78,0x87,0x87,//2009
0xA5,0xB4,0x96,0xA5,0xA6,0x96,0x88,0x88,0x78,0x78,0x87,0x87,//20 10
0x95,0xB4,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x79,0x78,0x87,//20 1 1
0x96,0xB4,0xA5,0xB5,0xA5,0xA6,0x87,0x88,0x87,0x78,0x87,0x86,//20 12
0xA5,0xB3,0xA5,0xB5,0xA6,0xA6,0x87,0x88,0x88,0x78,0x87,0x87,//20 13
0xA5,0xB4,0x96,0xA5,0xA6,0x96,0x88,0x88,0x78,0x78,0x87,0x87,//20 14
0x95,0xB4,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x79,0x77,0x87,//20 15
0x95,0xB4,0xA5,0xB4,0xA5,0xA6,0x87,0x88,0x87,0x78,0x87,0x86,//20 16
0xA5,0xC3,0xA5,0xB5,0xA6,0xA6,0x87,0x88,0x88,0x78,0x87,0x87,//20 17
0xA5,0xB4,0xA6,0xA5,0xA6,0x96,0x88,0x88,0x78,0x78,0x87,0x87,//20 18
0xA5,0xB4,0x96,0xA5,0x96,0x96,0x88,0x78,0x78,0x79,0x77,0x87,//20 19
0x95,0xB4,0xA5,0xB4,0xA5,0xA6,0x97,0x87,0x87,0x78,0x87,0x86,//2020
0xA5,0xC3,0xA5,0xB5,0xA6,0xA6,0x87,0x88,0x88,0x78,0x87,0x86,//202 1
0xA5,0xB4,0xA5,0xA5,0xA6,0x96,0x88,0x88,0x88,0x78,0x87,0x87,//2022
0xA5,0xB4,0x96,0xA5,0x96,0x96,0x88,0x78,0x78,0x79,0x77,0x87,//2023
0x95,0xB4,0xA5,0xB4,0xA5,0xA6,0x97,0x87,0x87,0x78,0x87,0x96,//2024
0xA5,0xC3,0xA5,0xB5,0xA6,0xA6,0x87,0x88,0x88,0x78,0x87,0x86,//2025
0xA5,0xB3,0xA5,0xA5,0xA6,0xA6,0x88,0x88,0x88,0x78,0x87,0x87,//2026
0xA5,0xB4,0x96,0xA5,0x96,0x96,0x88,0x78,0x78,0x87,0x87,//2027
0x95,0xB4,0xA5,0xB4,0xA5,0xA6,0x97,0x87,0x87,0x78,0x87,0x96,//2028
0xA5,0xC3,0xA5,0xB5,0xA6,0xA6,0x87,0x88,0x88,0x78,0x87,0x86,//2029
0xA5,0xB3,0xA5,0xA5,0xA6,0xA6,0x88,0x88,0x88,0x78,0x87,0x87,//2030
0xA5,0xB4,0x96,0xA5,0x96,0x96,0x88,0x78,0x78,0x87,0x87,//203 1
0x95,0xB4,0xA5,0xB4,0xA5,0xA6,0x97,0x87,0x87,0x78,0x87,0x96,//2032
0xA5,0xC3,0xA5,0xB5,0xA6,0xA6,0x88,0x88,0x88,0x78,0x87,0x86,//2033
0xA5,0xB3,0xA5,0xA5,0xA6,0xA6,0x88,0x78,0x88,0x78,0x87,0x87,//2034
0xA5,0xB4,0x96,0xA5,0xA6,0x96,0x88,0x88,0x78,0x78,0x87,0x87,//2035
0x95,0xB4,0xA5,0xB4,0xA5,0xA6,0x97,0x87,0x87,0x78,0x87,0x96,//2036
0xA5,0xC3,0xA5,0xB5,0xA6,0xA6,0x87,0x88,0x88,0x78,0x87,0x86,//2037
0xA5,0xB3,0xA5,0xA5,0xA6,0xA6,0x88,0x88,0x88,0x78,0x87,0x87,//2038
0xA5,0xB4,0x96,0xA5,0xA6,0x96,0x88,0x88,0x78,0x78,0x87,0x87,//2039
0x95,0xB4,0xA5,0xB4,0xA5,0xA6,0x97,0x87,0x87,0x78,0x87,0x96,//2040
0xA5,0xC3,0xA5,0xB5,0xA5,0xA6,0x87,0x88,0x87,0x78,0x87,0x86,//204 1
0xA5,0xB3,0xA5,0xB5,0xA6,0xA6,0x88,0x88,0x88,0x78,0x87,0x87,//2042
0xA5,0xB4,0x96,0xA5,0xA6,0x96,0x88,0x88,0x78,0x78,0x87,0x87,//2043
0x95,0xB4,0xA5,0xB4,0xA5,0xA6,0x97,0x87,0x87,0x88,0x87,0x96,//2044
0xA5,0xC3,0xA5,0xB4,0xA5,0xA6,0x87,0x88,0x87,0x78,0x87,0x86,//2045
0xA5,0xB3,0xA5,0xB5,0xA6,0xA6,0x87,0x88,0x88,0x78,0x87,0x87,//2046
0xA5,0xB4,0x96,0xA5,0xA6,0x96,0x88,0x88,0x78,0x78,0x87,0x87,//2047
0x95,0xB4,0xA5,0xB4,0xA5,0xA5,0x97,0x87,0x87,0x88,0x86,0x96,//2048
0xA4,0xC3,0xA5,0xA5,0xA5,0xA6,0x97,0x87,0x87,0x78,0x87,0x86,//2049
0xA5,0xC3,0xA5,0xB5,0xA6,0xA6,0x87,0x88,0x78,0x78,0x87,0x 87 }; //2050
Private date time m _ Date
Public date, time and date
{
get { return m _ Date}
set { m _ Date = value}
}
Public date ()
{
Date = date and time. Today;
}
Public date (date time dt)
{
Date = dt. Date;
}
//Calculate the constellation number of the specified date.
public int GetConstellation()
{
int Y,M,D;
Y = m_Date。 Year;
M = m_Date。 Month;
D = m_Date。 Day;
y = M * 100+D;
If ((y> = 321); & amp(Y & lt= 4 19))){ return 0; }
else if((Y & gt; = 420)& amp; & amp(Y & lt= 520)){ return 1; }
else if((Y & gt; = 52 1); & amp(Y & lt= 620)){ return 2; }
else if((Y & gt; = 62 1); & amp(Y & lt= 722)){ return 3; }
else if((Y & gt; = 723)& amp; & amp(Y & lt= 822)){ return 4; }
else if((Y & gt; = 823)& amp; & amp(Y & lt= 922)){ return 5; }
else if((Y & gt; = 923)& amp; & amp(Y & lt= 1022)){ return 6; }
else if((Y & gt; = 1023); & amp(Y & lt= 1 12 1)){ return 7; }
else if((Y & gt; = 1 122)& amp; & amp(Y & lt= 122 1)){ return 8; }
else if((Y & gt; = 1222)| |(Y & lt; = 1 19)){ return 9; }
else if((Y & gt; = 120); & amp(Y & lt= 2 18)){ return 10; }
else if((Y & gt; = 2 19); & amp(Y & lt= 320)){ return 1 1; }
else { return- 1; };
}
//Calculate the name of the constellation on the specified date.
Public string GetConstellationName ()
{
Int constellation;
constellation = get constellation();
If ((constellation & gt = 0)&; & (constellation & lt= 1 1))
{ return Constellation name[Constellation]; }
other
{ return};
}
//Calculate the solar terms corresponding to the Gregorian calendar day from 0 to 23,-1 indicates that it is not a solar term.
public int l_GetLunarHolDay()
{
Byte flag;
int Day,iYear,iMonth,iDay
iYear = m_Date。 Year;
If ((iyear < start _ year) || (iyear >; Year-end))
{ return- 1; };
iMonth = m_Date。 Month;
iDay = m_Date。 Day;
flag = gLunarHolDay[(iYear-START _ YEAR)* 12+iMonth- 1];
if(iDay & lt; 15)
{ Day = 15-((Flag & gt; & gt4)& amp; 0x0f); }
other
{ Day =(Flag & amp; 0x0f)+ 15; };
if (iDay == Day)
{
if(iDay & gt; 15)
{ return(iMonth- 1)* 2+ 1; }
other
{ return(iMonth- 1)* 2; }
}
other
{ return- 1; };
}
Common string format Month(ushort iMonth, bool bLunar)
{
string SZ text = " positive 234567890 ";
String strMonth
If ((! BLunar) and amp&(imonth = =1))
{Return to "January"; }
if(iMonth & lt; = 10)
{
strMonth =
strMonth = strMonth + szText。 Substring(iMonth - 1, 1);
StrMonth = strMonth+ "month";
Return to strMonth
}
if (iMonth == 1 1)
{ strMonth = " eleven}
other
{strMonth = "twelve"; }
return strMonth +"
- Related articles
- 12 constellation favorite gift?
- What is the favorite flower of the zodiac?
- A constellation girl who is not outstanding but very attractive.
- What constellation is the birthday on the fifth day of April in the lunar calendar?
- What are the constellations that are very single-minded emotionally and have charm beyond your imagination?
- Is Beibei with cu?
- Who can give me all the names of Altman?
- Who is this cartoon character?
- What constellation is Gregorian September 19? What is the constellation of September 19 birthday?
- How can you see the sincerity of Libra women to their friends?