123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #ifndef __CALENDAREX_20160127__
- #define __CALENDAREX_20160127__
- #pragma once
- namespace CalendarEx
- {
- //保存一个农历日期;
- typedef struct _STLUNARDATE_
- {
- INT nYear;
- INT nMonth;
- INT nDay;
- bool bIsLeapMonth; //是否闰月;
- _STLUNARDATE_() {
- nYear = 0;
- nMonth = 0;
- nDay = 0;
- bIsLeapMonth = FALSE;
- }
- } LunarDate, *pLunarDate;
- // 农历日期有效性;
- BOOL IsValidLunanrDate(IN LPCTSTR lpLunarDate);
- // 农历日期有效性;
- BOOL IsValidLunanrDate(IN INT nLunarYear, IN INT nLunarMonth, IN INT nLunarDay);
- BOOL IsValidSolarStrDate(IN LPCTSTR lpSolarDate, IN BOOL bThisyear);
-
- BOOL IsValidSolarDate(
- IN CONST INT &nSolarYear,
- IN CONST INT &nSolarMonth,
- IN CONST INT &nSolarDay);
-
- INT DayOfSolarYear(
- IN CONST INT &nSolarYear,
- IN CONST INT &nSolarMonth,
- IN CONST INT &nSolarDay);
- INT SolarToLuanrDate(
- IN CONST INT &nSolarYear,
- IN CONST INT &nSolarMonth,
- IN CONST INT &nSolarDay,
- OUT LunarDate &lnaDate);
- INT GetLunarDate(
- IN CONST INT &nSolarYear,
- IN CONST INT &nSolarMonth,
- IN CONST INT &nSolarDay,
- OUT LPTSTR lpLunarDate);
- BOOL LuanrToSolarDate(
- IN CONST INT &nLunarYear,
- IN CONST INT &nLunarMonth,
- IN CONST INT &nLunarDay,
- OUT LPTSTR lpSolarDate,
- IN BOOL bIsLeapMonth = FALSE );
- INT IsLeapMonth(IN const INT &nLunarYear);
- };
- #endif
|