获取十二生肖

var chinseCaleander = new System.Globalization.ChineseLunisolarCalendar();

string TreeYear = "鼠牛虎兔龙蛇马羊猴鸡狗猪";

int intYear = chinseCaleander.GetSexagenaryYear(DateTime.Now);

string Tree = TreeYear.Substring(chinseCaleander.GetTerrestrialBranch(intYear) - 1, 1);

 

你可能感兴趣的:(获取)