add datetime format.

This commit is contained in:
luocai 2024-07-15 17:51:54 +08:00
parent bb351137cb
commit 7afe23379b

View File

@ -34,6 +34,12 @@ public:
Week week() const; Week week() const;
std::chrono::time_point<std::chrono::system_clock> operator()(); std::chrono::time_point<std::chrono::system_clock> operator()();
/**
* @brief toString
* @param format %Y%m%d%H%M%S 20240715171145
* @return
*/
std::string toString(const std::string_view &format = "%F %T") const; std::string toString(const std::string_view &format = "%F %T") const;
/** /**