Files
core/ASCOfficePPTXFile/PPTXFormat/DocxFormat/DateTime.h
Sergey.Konovalov 6847df2da0 для стыковки с docxFile2 как код: код лежащий в PPTXFile поменял namespace OOX -> PPTX; отделение com интерфейса от логики.
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@58310 954022d7-b5bf-4e40-9824-e11837661b57
2016-05-20 23:14:07 +03:00

51 lines
910 B
C++

#pragma once
#ifndef OOX_DATE_TIME_INCLUDE_H_
#define OOX_DATE_TIME_INCLUDE_H_
#include "../../../Common/DocxFormat/Source/Utility/Utility.h"
namespace PPTX
{
class DateTime
{
public:
DateTime()
{
}
explicit DateTime(const CString& value) : m_datetime(value, s_pattern)
{
}
explicit DateTime(const ::DateTime& dt) : m_datetime(dt)
{
}
public:
CString ToString() const
{
return m_datetime.ToString(s_pattern);
}
static DateTime Parse(const CString& value)
{
return DateTime(value);
}
public:
::DateTime& datetime()
{
return m_datetime;
}
const ::DateTime& datetime() const
{
return m_datetime;
}
private:
static const CString s_pattern;
::DateTime m_datetime;
};
const CString DateTime::s_pattern = _T("%YYYY-%MM-%DDT%hh:%mm:%ssZ");
} // namespace PPTX
#endif // OOX_DATE_TIME_INCLUDE_H_