|
|
|
@ -39,6 +39,7 @@
|
|
|
|
|
#define headerfile_picotools_mainparser_mainparser
|
|
|
|
|
|
|
|
|
|
#include <ctime>
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -86,14 +87,19 @@ public:
|
|
|
|
|
Date(const Date & d);
|
|
|
|
|
Date(time_t t);
|
|
|
|
|
Date(const tm & t);
|
|
|
|
|
template<class CStringType> Date(const CStringType * str);
|
|
|
|
|
template<class StringType> Date(const StringType & str);
|
|
|
|
|
Date(const char * str);
|
|
|
|
|
Date(const wchar_t * str);
|
|
|
|
|
Date(const std::string & str);
|
|
|
|
|
Date(const std::wstring & str);
|
|
|
|
|
|
|
|
|
|
Date & operator=(const Date & d);
|
|
|
|
|
Date & operator=(time_t t);
|
|
|
|
|
Date & operator=(const tm & t);
|
|
|
|
|
template<class CStringType> Date & operator=(const CStringType * str);
|
|
|
|
|
template<class StringType> Date & operator=(const StringType & str);
|
|
|
|
|
Date & operator=(const char * str);
|
|
|
|
|
Date & operator=(const wchar_t * str);
|
|
|
|
|
Date & operator=(const std::string & str);
|
|
|
|
|
Date & operator=(const std::wstring & str);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
@ -105,6 +111,12 @@ public:
|
|
|
|
|
Date & operator-=(time_t t);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
swapping the contents of *this with date
|
|
|
|
|
*/
|
|
|
|
|
void Swap(Date & date);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
converts time_t in seconds (from the Unix Epoch) to this object
|
|
|
|
|
*/
|
|
|
|
@ -456,40 +468,6 @@ private:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template<class CStringType>
|
|
|
|
|
Date::Date(const CStringType * str)
|
|
|
|
|
{
|
|
|
|
|
// parsing can be break in the middle of the string (if errors)
|
|
|
|
|
// and some values would not be initialized
|
|
|
|
|
Clear();
|
|
|
|
|
Parse(str);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template<class StringType>
|
|
|
|
|
Date::Date(const StringType & str)
|
|
|
|
|
{
|
|
|
|
|
Clear();
|
|
|
|
|
Parse(str);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template<class CStringType>
|
|
|
|
|
Date & Date::operator=(const CStringType * str)
|
|
|
|
|
{
|
|
|
|
|
Parse(str);
|
|
|
|
|
|
|
|
|
|
return *this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template<class StringType>
|
|
|
|
|
Date & Date::operator=(const StringType & str)
|
|
|
|
|
{
|
|
|
|
|
Parse(str);
|
|
|
|
|
|
|
|
|
|
return *this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|