mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-18 03:31:18 +08:00
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@52920 954022d7-b5bf-4e40-9824-e11837661b57
34 lines
723 B
C++
34 lines
723 B
C++
#pragma once
|
|
#ifndef UTILITY_DATE_TIME_INCLUDE_H_
|
|
#define UTILITY_DATE_TIME_INCLUDE_H_
|
|
|
|
#include <string>
|
|
#include <time.h>
|
|
#include <algorithm>
|
|
|
|
class DateTime
|
|
{
|
|
public:
|
|
DateTime();
|
|
DateTime(const std::string& value, const std::string& pattern);
|
|
|
|
public:
|
|
const std::string ToString(const std::string& pattern) const;
|
|
|
|
public:
|
|
static const DateTime Parse(const std::string& value, const std::string& pattern);
|
|
|
|
private:
|
|
static const int ParseValue(const std::string& value, const std::string& pattern, const std::string& element);
|
|
|
|
private:
|
|
int m_year;
|
|
int m_month;
|
|
int m_day;
|
|
int m_hour;
|
|
int m_minute;
|
|
int m_second;
|
|
int m_millisecond;
|
|
};
|
|
|
|
#endif // UTILITY_DATE_TIME_INCLUDE_H_
|