C# Class Com.Aurora.AuWeather.LunarCalendar.CalendarInfo

Exibir arquivo Open project: aurora-lzzp/Aurora-Weather Class Usage Examples

Public Properties

Property Type Description
BirthStones string[]
ChineseDayName string[]
ChineseMonthName string[]
ChineseWeekName string[]
Constellations string[]

Public Methods

Method Description
CalcConstellation ( System.DateTime date ) : void

获取指定日期的星座和生日石

CalendarInfo ( ) : System

默认构造体传入当前日期

CalendarInfo ( System.DateTime date ) : System

生成指定日期的公历和阴历

FromLunarDate ( System.DateTime date, bool IsLeapMonth ) : CalendarInfo

create calendarInfo of Lunar

FromLunarDate ( int year, int month, int day, bool IsLeapMonth ) : CalendarInfo

create calendarInfo of Lunar

FromLunarDate ( string date, bool IsLeapMonth ) : CalendarInfo

create calendarInfo of Lunar

GetDateFromLunarDate ( System.DateTime date, bool IsLeapMonth ) : System.DateTime

Lunar To Solar

GetDateFromLunarDate ( int year, int month, int day, bool IsLeapMonth ) : System.DateTime

农历转公历

Private Methods

Method Description
GetLunarNewYearDate ( int year ) : System.DateTime

根据指定公历年查找农历新年

LoadFromSolarDate ( ) : void

Method Details

CalcConstellation() public method

获取指定日期的星座和生日石
public CalcConstellation ( System.DateTime date ) : void
date System.DateTime specifica date
return void

CalendarInfo() public method

默认构造体传入当前日期
public CalendarInfo ( ) : System
return System

CalendarInfo() public method

生成指定日期的公历和阴历
public CalendarInfo ( System.DateTime date ) : System
date System.DateTime specific date
return System

FromLunarDate() public static method

create calendarInfo of Lunar
public static FromLunarDate ( System.DateTime date, bool IsLeapMonth ) : CalendarInfo
date System.DateTime Lunar Date
IsLeapMonth bool IsLeapMonth
return CalendarInfo

FromLunarDate() public static method

create calendarInfo of Lunar
public static FromLunarDate ( int year, int month, int day, bool IsLeapMonth ) : CalendarInfo
year int Lunar Year
month int Lunar Month
day int Lunar Date
IsLeapMonth bool IsLeapMonth
return CalendarInfo

FromLunarDate() public static method

create calendarInfo of Lunar
public static FromLunarDate ( string date, bool IsLeapMonth ) : CalendarInfo
date string ie: 20070209
IsLeapMonth bool IsLeapMonth
return CalendarInfo

GetDateFromLunarDate() public static method

Lunar To Solar
public static GetDateFromLunarDate ( System.DateTime date, bool IsLeapMonth ) : System.DateTime
date System.DateTime Lunar Date
IsLeapMonth bool IsLeapMonth
return System.DateTime

GetDateFromLunarDate() public static method

农历转公历
public static GetDateFromLunarDate ( int year, int month, int day, bool IsLeapMonth ) : System.DateTime
year int Lunar Year
month int Lunar Month
day int Lunar day
IsLeapMonth bool IsLeapMonth
return System.DateTime

Property Details

BirthStones public_oe static_oe property

public static string[] BirthStones
return string[]

ChineseDayName public_oe static_oe property

public static string[] ChineseDayName
return string[]

ChineseMonthName public_oe static_oe property

public static string[] ChineseMonthName
return string[]

ChineseWeekName public_oe static_oe property

public static string[] ChineseWeekName
return string[]

Constellations public_oe static_oe property

public static string[] Constellations
return string[]