12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- #ifndef __CALENDAREX_HEADER__
- #define __CALENDAREX_HEADER__
- #include <ctime>
- #include <cassert>
- #include <cstring>
- #include <iostream>
- using namespace std;
- typedef struct _STDATE_
- {
- int year;
- int month;
- int day;
- bool leap;
- } Date;
- #pragma once
- class CCalendarEx
- {
- CCalendarEx();
- public:
- ~CCalendarEx();
- static CCalendarEx* GetInstnace()
- {
- static CCalendarEx tagInstance;
- return &tagInstance;
- }
-
- int DayOfSolarYear(int year, int month, int day);
- bool IsValidLunanrDate(int lunar_year, int lunar_month, int lunar_day);
-
- Date SolarToLuanrDate(int solar_year, int solar_month, int solar_day);
- CString GetLunarDate(int solar_year, int solar_month, int solar_day);
-
- CString LuanrToSolarDate(int lunar_year, int lunar_month, int lunar_day, BOOL bLeap = FALSE);
- };
- #endif
|