Skip to content

Commit

Permalink
add clangTools::date
Browse files Browse the repository at this point in the history
  • Loading branch information
kekxv committed Jun 15, 2024
1 parent cb5def6 commit 8eebe67
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/date/date.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#ifndef CLANGTOOLS_DATE_HPP
#define CLANGTOOLS_DATE_HPP
#include <ctime>
#include <istream>
#include <memory>
#include <string>
Expand All @@ -15,6 +16,8 @@ namespace clangTools {
// 重命名time_point类型
using _time_point = std::chrono::time_point<system_clk>;

private:
_time_point m_time_point;
public:
static std::shared_ptr<date> now();

Expand Down Expand Up @@ -146,8 +149,6 @@ namespace clangTools {

static std::string replace_format(const char *format_string = "yyyy-MM-dd HH:mm:ss");

private:
_time_point m_time_point;
};
}

Expand Down

0 comments on commit 8eebe67

Please sign in to comment.