CalendarConvert.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // CalendarConvert.h: interface for the CCalendarConvert class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. /****************************************************************************************************************
  5. 投稿说明:
  6. ****************************************************************************************************************/
  7. #define NOTE_CalendarConvert \
  8. " ◆◆◆ 说明:◆◆◆\r\n\
  9. 公历(阳历)和农历(阴历)相互转换,公历转农历代码是从网上当的,我做了农历转公历的代码并写了示例程序。\
  10. 其实网上也有很多有关公历转农历的控件,但作为一个程序员就是不太习惯于使用别人的控件,因为那样将不便调试\
  11. 和差错。\r\n\
  12. \r\n\
  13. ◆◆◆ 作者:◆◆◆\r\n\
  14. 谢红伟 · chrys · chrys@163.com · http://ndxz.126.com\r\n\
  15. \r\n\
  16. ◆◆◆ 日期:◆◆◆\r\n\
  17. 2006-02-16 11:40:08"
  18. #if !defined(AFX_CALENDARCONVERT_H__98D06A45_DA45_4309_BF79_A4AECDA1B72D__INCLUDED_)
  19. #define AFX_CALENDARCONVERT_H__98D06A45_DA45_4309_BF79_A4AECDA1B72D__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. class CCalendarConvert
  24. {
  25. public:
  26. COleDateTime ConvertSysTime2OleDateTime ( PSYSTEMTIME pSt );
  27. CString GetLunarString ( IN PSYSTEMTIME pSt, BOOL bEmbolism );
  28. BOOL Gregorian2Lunar ( IN PSYSTEMTIME pSt, OUT PSYSTEMTIME pDst, OUT BOOL *pEmbolism );
  29. BOOL Lunar2Gregorian ( IN PSYSTEMTIME pSt, IN BOOL bEmbolism, OUT PSYSTEMTIME pDst );
  30. CCalendarConvert();
  31. virtual ~CCalendarConvert();
  32. };
  33. #endif // !defined(AFX_CALENDARCONVERT_H__98D06A45_DA45_4309_BF79_A4AECDA1B72D__INCLUDED_)