VB.NET的阳历与农历转换的算法根据经验, 这个算法非常复杂. 经过查找,终于得到一些资料, 在此愿与大家分享 。首先阴历以月为基本单位,一个月以新月出现的那一天为始直至下一个新月出现的前一天 。由于月亮公转的周期介于29到30天之间,阴历的一个月也就由新月出现时刻的早晚或是29天或是30天 。大月为30天,小月为29天 。与阳历不同的是,大小月在不同的年中不固定 。如春节的前一天常称为大年三十,但有不少年如2000年的阴历十二月只有29天 。由于十二个月的时间较阳历年即地球绕太阳公转一周的时间短11天左右. 为了使阴历年与阳历年保持相对稳定 , 每隔两三年就需要加入一个闰月 。大约每十九年要加入七个闰月 。而二十四节气则是由地球在绕太阳公转的轨道上的位置确定的 。以每年的冬至为始,每15度为一个节气 。是故二十四节气在阳历的每月中有大概固定的日期 。古时以二十四节气指导农耕,这就是阴历又称农历的原因 。其中阳历下半月的十二个节气又称为中气 。中气出现的时刻和闰月的确定有直接的关系 。阴历的计算有下列四条规则: 1.所有新月和节气出现的时刻的计算以东经120度即东八区标准时为准 。但计算1929年以前的阴历时应以北京即东经116度25分的当地时为准 。2.新月出现的一天为一个月的第一天 。如某个节气的出现时刻也在这一天,则不论该节气的出现时刻是否比新月晚,一律算落入新的一个月中 。3.每年的冬至总是落在这年的十一月中 。从一年的冬至的第二天起到下一年冬至这一天止的这段时间称为一岁 。如一岁中有十三个新月出现 , 则这一岁为闰岁,要加入一个闰月 。4.闰岁中第一个没有中气的月为闰月 。因为一岁中只有十二个中气,所以闰岁中至少有一个月没有中气,也存在有两个月没有中气的可能性 。但这种情况下只有第一个没有中气的月为闰月 。闰月的前一个月为几月则该闰月称为闰几月 。根据以上信息, 我们知道农历是根据天文观测进行指定的(也许可以在天文学的书上找到说明) 。为了简化转换计算, 很多程序人员设计了基于"时间段内查表"方法的例程. 更具体的说明和源码请参考下面这些资料:
关于24节气时间计算的问题写不下了
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,//
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x1F,0xF0,0x1F,0xF0,//
0x3F,0xF0,0x0C,0xD0,0x3B,0xF0,0xEC,0x5E,0xCF,0xC0,0x08,0x40,0x0F,0xC0,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0xC0,0x7F,0xF8,0x05,0x40,//
0x06,0xC0,0x3E,0x78,0x0E,0x7C,0x07,0x60,0x8E,0x60,0xFC,0x60,0x70,0x60,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x80,0x08,0xF8,0x2A,0x60,//
0x2B,0xF8,0x1A,0x60,0x1D,0xF0,0x34,0x6E,0x66,0x60,0xC1,0xE0,0x40,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x60,0x3F,0xC0,0x30,0x40,//
0x1F,0xC0,0x10,0x40,0x1F,0xC0,0x10,0x60,0x30,0x30,0x30,0x1C,0x10,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0xFF,0xF8,0x30,0x1E,//
0x37,0x94,0x34,0x90,0x37,0x90,0x34,0x90,0x30,0x10,0x1E,0x10,0x0C,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x10,0x7C,0xFF,0x6C,//
0xFF,0xEC,0x11,0x7C,0x13,0x6C,0x10,0x6C,0x10,0x7C,0x1F,0x00,0x0C,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xC8,0x78,0x3C,0x30,0x00,//
0x0F,0x00,0x02,0x00,0x06,0x00,0x06,0x00,0x02,0x00,0x03,0x10,0x01,0xE0,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x00,0x18,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x20,0x0C,0x1C,0x3F,0xA0,//
0x06,0xB8,0x04,0x1E,0x3F,0x94,0x04,0x10,0x0E,0x10,0xFF,0xD0,0x80,0x30,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0xFF,0xFC,0x1F,0xE0,//
0x17,0xE0,0x0B,0x10,0x17,0xF0,0xFB,0x1C,0x1F,0xF0,0x01,0x00,0x01,0xC0,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x30,0x01,0xF0,//
0xFC,0x4C,0x47,0xF8,0x44,0x44,0x44,0xE0,0x7D,0x30,0x02,0x1C,0x00,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x00,0x31,0xE0,0x1D,0x30,//
0x33,0xC0,0xFC,0x38,0xC3,0x80,0x33,0x70,0x0E,0x00,0x03,0xE0,0x00,0x7C,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x0B,0x40,0x13,0x60,//
0x63,0x30,0xDB,0x08,0x0D,0x00,0x06,0x00,0x03,0x80,0x00,0xF0,0x00,0x3C,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x24,0x00,0x24,0x00,0x24,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x02,0x3C,0xFF,0x6C,//
0x04,0xCC,0x3C,0x7C,0x04,0x4C,0x7C,0x6C,0x04,0x7C,0x04,0x00,0x04,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x7F,0xF0,0x04,0x80,//
0x3A,0x60,0x17,0xBC,0x0A,0x2C,0x1E,0x20,0x73,0xA0,0xE0,0xE0,0x00,0x20,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x03,0x00,0x0B,0x40,//
0x1B,0x60,0x33,0x30,0x63,0x38,0xE3,0x1C,0x43,0x00,0x03,0xE0,0x03,0xC0,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2D,0x30,0x3F,0x30,0x7F,0xFC,//
0x1D,0x30,0x6C,0xF0,0xFF,0xA8,0xD2,0x64,0x0C,0x20,0x37,0x30,0x00,0x20,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x20,0x0F,0xE0,0x0C,0x60,//
0x04,0xE0,0x07,0x00,0x07,0x00,0x1D,0x80,0xF8,0xE0,0xF0,0x3C,0x00,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x7F,0xF0,0x01,0x98,//
0x03,0xC0,0x3F,0xE0,0x0A,0x80,0x1A,0xC0,0x32,0x30,0xC3,0xCC,0x03,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xF0,0x0A,0xA0,//
0x0E,0xE0,0x0B,0xA0,0x09,0x20,0x1A,0xB0,0x3C,0x58,0xF0,0x3E,0x60,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x00,0x18,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x20,0x06,0x20,0x7F,0xFC,//
0x0B,0x24,0x09,0x20,0x0E,0xF8,0x0C,0x88,0x34,0xF8,0xE3,0x00,0xC0,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x7F,0xF8,0x6F,0xE8,//
0x63,0x08,0x6F,0xC8,0x6B,0x08,0x7F,0xE8,0x60,0x08,0x7F,0xF8,0x00,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x3F,0xF0,0x03,0x00,//
0x07,0x00,0x1B,0x80,0x33,0xC0,0x63,0x70,0xE3,0x1C,0x03,0x00,0x03,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x10,0x7F,0xD0,0x13,0x10,//
0x1D,0x7C,0x13,0x10,0xFF,0xD0,0xDD,0xB8,0x13,0x84,0x3F,0x00,0x00,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x7F,0xF8,0x60,0x18,//
0x6F,0xD8,0x6C,0x58,0x2C,0x58,0x2F,0xD8,0x20,0x18,0x3F,0xF8,0x00,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x60,0x04,0x40,0xFF,0xFC,//
0xD1,0x20,0x1F,0xF0,0x1F,0xF0,0x10,0x20,0x1F,0xE0,0x1F,0xE0,0x10,0x20,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x60,0x3F,0xC0,0x30,0x40,//
0x1F,0xC0,0x10,0x40,0x1F,0xC0,0x10,0x60,0x30,0x30,0x30,0x1C,0x10,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x46,0x00,0x7E,0xF8,0x66,0x88,//
0x7E,0xF8,0x66,0x48,0x62,0x48,0x7E,0x78,0x61,0x00,0x61,0xE0,0x60,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x03,0x00,0x7F,0xF8,//
0x63,0x08,0x63,0x08,0x7F,0xF8,0x03,0x00,0x03,0x00,0x03,0x00,0x01,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x24,0x00,0x24,0x00,0x24,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x3D,0xF8,0x17,0x50,//
0x7D,0xF0,0x7D,0xF0,0x15,0x08,0x3D,0x68,0x7D,0x68,0xE5,0x04,0x06,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x22,0x20,0x32,0x30,0x12,0xFC,//
0x7F,0x30,0x00,0x70,0x7F,0xB8,0x00,0x3C,0xFF,0xB4,0xFF,0xB0,0x00,0x30,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xF0,0x03,0x00,//
0x03,0x00,0x1F,0xF0,0x13,0x00,0x1B,0x00,0xFF,0xFC,0xF8,0x0C,0x40,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x39,0x78,0xD7,0x90,//
0x91,0xD0,0x91,0x48,0x4F,0x7C,0x4E,0x54,0x26,0x70,0x3B,0x80,0x10,0x80,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x7F,0xF0,0x00,0x20,//
0x32,0x20,0x32,0xE0,0x12,0xB0,0x10,0x98,0x08,0x1E,0xFF,0xE4,0x40,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x40,0x36,0x70,0x06,0x30,//
0x3F,0xAC,0x0A,0x60,0x0A,0x78,0x0B,0x64,0x99,0xA0,0xF0,0x70,0x60,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x7F,0xF0,0x01,0x88,//
0x04,0xC0,0x04,0x60,0x3F,0xF8,0x04,0x6C,0x04,0x60,0xFF,0xE0,0x00,0x60,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x00,0x18,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x13,0x90,0x3F,0xF0,0x10,0x30,//
0x10,0x20,0x1F,0xE0,0x18,0x20,0x0C,0xC0,0x38,0x70,0xF0,0x1C,0x40,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xE0,0x08,0x60,0x0F,0xE0,//
0x0F,0xE0,0x7F,0xF8,0x02,0x48,0x0E,0x60,0x07,0xF0,0xFC,0x1E,0x70,0x04,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x03,0x60,0x1F,0xF0,//
0x03,0x10,0x1F,0xF0,0x0F,0x80,0x3B,0x60,0xF3,0x1C,0xC3,0x00,0x03,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xFF,0xF8,0x7E,0xA0,//
0x43,0xF8,0x5A,0x88,0x4A,0xE8,0x4B,0x68,0x3C,0xCC,0x66,0x30,0x82,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0xFC,0x7E,0x44,//
0x1B,0x44,0x1B,0xF8,0x0C,0x08,0x1C,0x88,0x36,0x78,0xE3,0xDC,0xC0,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x24,0x00,0x24,0x00,0x24,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x7E,0xB0,0x41,0x20,//
0x40,0xA0,0x5F,0xA0,0x49,0xA0,0x4F,0xB0,0x48,0x98,0x40,0x0C,0x40,0x04,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xF0,0x1F,0xF8,//
0xF0,0x84,0x1F,0xF0,0x00,0xC0,0x3F,0xE0,0x21,0xBE,0x3F,0x80,0x00,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x60,0x3A,0xD0,0x07,0x98,//
0x3E,0x60,0x04,0xF0,0x32,0xF0,0x1E,0x90,0x06,0xF8,0xFC,0x8C,0x60,0x84,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0xFF,0xF8,0xE1,0x9C,//
0x10,0xC0,0x1F,0xE0,0x1F,0xBC,0x19,0x80,0x16,0x80,0x10,0xE0,0x10,0x20,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x40,0x07,0xC0,0x04,0x40,//
0x04,0x40,0x04,0x40,0x04,0x60,0x04,0x60,0xFC,0x38,0xF8,0x1C,0x00,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x00,0x31,0xE0,0x1D,0x30,//
0x33,0xC0,0xFC,0x38,0xC3,0x80,0x33,0x70,0x0E,0x00,0x03,0xE0,0x00,0x7C,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0D,0xF0,0x2E,0x48,0x1F,0xF8,//
0x1D,0x70,0x23,0x48,0x4A,0x34,0x05,0xE4,0x07,0x04,0xFC,0x04,0x60,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x00,0x18,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x30,0x06,0x70,0x1B,0x74,//
0x71,0xB4,0xEF,0xF4,0x10,0x30,0x3F,0x30,0x31,0x30,0x1F,0x30,0x11,0x10,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x22,0x40,0x36,0x38,0x34,0x9E,//
0x30,0x90,0x10,0x90,0x12,0x90,0x29,0xD0,0xEC,0xD0,0xC6,0x10,0x01,0x10,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//
0x00,0x00,0xFF,0xFC,0xF0,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x98,0x04,0x30,//
0x04,0x04,0x04,0x1C,0x04,0x00,0x04,0x20,0xFF,0xD8,0xF0,0x6C,0x00,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x1F,0xF0,0x1F,0xF0,//
0x3F,0xF0,0x0C,0xD0,0x3B,0xF0,0xEC,0x5E,0xCF,0xC0,0x08,0x40,0x0F,0xC0,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x03,0x00,0x33,0x78,//
0x0F,0xD8,0x0D,0x40,0x39,0x60,0xF1,0x38,0xE1,0x1C,0x01,0xE0,0x01,0x80,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x21,0x80,0x7F,0xF0,//
0x60,0x10,0x6F,0xD0,0x6C,0xD0,0x6C,0x90,0x6F,0x98,0x60,0x0E,0x60,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x7F,0xF0,0x01,0x98,//
0x03,0xC0,0x3F,0xE0,0x0A,0x80,0x1A,0xC0,0x32,0x30,0xC3,0xCC,0x03,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x7F,0x98,0x0A,0x70,//
0x3B,0x84,0x04,0x3C,0x0F,0x00,0x0F,0x20,0x1E,0x9C,0xF6,0xE8,0x40,0x00,0x00,0x00,//
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x60,0x00,0x20,0x00,0x20,//
0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x00,0x00,0x20,0x00,0x20,//
求计算二十四节气的VB代码Private Function JieQi(TempDate As String) As String '计算节气
Dim S_Term(1 To 24) As String
Dim StInfo(1 To 24) As Long
Dim y As Integer, j As Integer, k As Integer
Dim E(1)As Double
Dim dtJAs Date
Dim strJmAs String, strJdAs String
Dim Strj As String'节气日期
'节气名
S_Term(1) = "小寒"
S_Term(2) = "大寒"
S_Term(3) = "立春"
S_Term(4) = "雨水"
S_Term(5) = "惊蛰"
S_Term(6) = "春分"
S_Term(7) = "清明"
S_Term(8) = "谷雨"
S_Term(9) = "立夏"
S_Term(10) = "小满"
S_Term(11) = "芒种"
S_Term(12) = "夏至"
S_Term(13) = "小暑"
S_Term(14) = "大署"
S_Term(15) = "立秋"
S_Term(16) = "处暑"
S_Term(17) = "白露"
S_Term(18) = "秋分"
S_Term(19) = "寒露"
S_Term(20) = "霜降"
S_Term(21) = "立冬"
S_Term(22) = "小雪"
S_Term(23) = "大雪"
S_Term(24) = "冬至"
'节气信息
StInfo(1) = 0
StInfo(2) = 21208
StInfo(3) = 42467
StInfo(4) = 63836
StInfo(5) = 85337
StInfo(6) = 107014
StInfo(7) = 128867
StInfo(8) = 150921
StInfo(9) = 173149
StInfo(10) = 195551
StInfo(11) = 218072
StInfo(12) = 240693
StInfo(13) = 263343
StInfo(14) = 285989
StInfo(15) = 308563
StInfo(16) = 331033
StInfo(17) = 353350
StInfo(18) = 375494
StInfo(19) = 397447
StInfo(20) = 419210
StInfo(21) = 440795
StInfo(22) = 462224
StInfo(23) = 483532
StInfo(24) = 504758
y = Val(Left(TempDate, 4)): j = Val(Mid(TempDate, 6, 2)): k = Val(Right(TempDate, 2))
If k = 15 Then
j = j * 2 - 1
Else
j = j * 2
End If
E(0) = (31556925.9747 * (y - 1900)StInfo(j) * 60#)
E(1) = DateDiff("s", "1970-1-10:0", "1900-1-62:5")E(0)
E(0) = E(1) / 2
dtJ = DateAdd("s", E(1) - E(0), DateAdd("s", E(0), "1970-1-11:18"))
dtJ = Year(dtJ)"-"Month(dtJ)"-"Day(dtJ)
If (Month(dtJ)10) Then
strJm = "0"Month(dtJ)
Else
strJm = Month(dtJ)
End If
If (Day(dtJ)10) Then
strJd = "0"Day(dtJ)
Else
strJd = Day(dtJ)
End If
Strj = Format(Year(dtJ)"-"strJm"-"strJd, "yyyy-mm-dd")
JieQi = ""
If DateDiff("d", Strj, TempDate) = -2 Then JieQi = "后天为"S_Term(j)"节气"
If DateDiff("d", Strj, TempDate) = -1 Then JieQi = "明天为"S_Term(j)"节气"
If Strj = TempDate Then JieQi = "今天是"S_Term(j)"节气"
End Function
【包含vb.net获取24节气的词条】vb.net获取24节气的介绍就聊到这里吧 , 感谢你花时间阅读本站内容,更多关于、vb.net获取24节气的信息别忘了在本站进行查找喔 。
推荐阅读
- 商品怎样在视频号推广引流,视频号推广方式
- redis集群指定节点,redis集群节点重启
- 毕业设计用纯硬件还是软件,毕业设计选硬件还是软件设计
- windows系统服务优化终结者的简单介绍
- jsforin循环6,js循环foreach
- 小白如何开始电商,小白怎么入手电商
- 最悲伤的抖音直播话术女,抖音直播话语大全
- 清空文件命令linux linux清空文件夹的命令
- 想学好电脑什么学,学什么一个月能学好