My Project
|
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 #pragma once 00029 #include "Define.h" 00030 #include <string> 00031 00032 namespace SallyAPI 00033 { 00034 namespace Date 00035 { 00044 00045 class DLL_API_SALLY DateHelper 00046 { 00047 private: 00048 DateHelper(); 00049 ~DateHelper(); 00050 public: 00051 static std::string GetCurrentDateString(bool withMilliseconds = true); 00052 static std::string GetDateString(SYSTEMTIME currentTime, bool withMilliseconds = true); 00053 static bool IsLeapYear(const UINT uJahr); 00054 static short GetDaysInMonth(const UINT uMonat, const UINT uJahr); 00055 static short GetDaysInYears(const UINT uJahr); 00056 static short GetWeekday(const UINT uTag, const UINT uMonat, const UINT uJahr); 00057 static short GetDayOfYear(const UINT uTag, const UINT uMonat, const UINT uJahr); 00058 static short GetCalendarWeek(const UINT uTag, const UINT uMonat, const UINT uJahr); 00059 static void GetEasterDate(const UINT uJahr, UINT & uTag, UINT & uMonat); 00060 static void GetFourthAdvent(const UINT uJahr, UINT & uTag, UINT & uMonat); 00061 static long TimeDifferneceInYears(const SYSTEMTIME& Startzeit, const SYSTEMTIME& Endezeit); 00062 static long TimeDifferenceInDays(const SYSTEMTIME& Startzeit, const SYSTEMTIME& Endezeit); 00063 static SYSTEMTIME TimeDifferenceInDays(const SYSTEMTIME& Startzeit, const long& Endezeit); 00064 static ULONGLONG GetMilliseconds(); 00065 static _int64 CalculateDelta(const SYSTEMTIME& st1, const SYSTEMTIME& st2); 00066 }; 00067 } 00068 }