orbum/utilities/src/Datetime.hpp
2018-08-08 22:51:39 +08:00

9 lines
261 B
C++

#pragma once
#include <string>
#include <ctime>
/// Returns a string of the given date and time with the specified format string.
/// Defaults to the current time.
std::string datetime_fmt(const char* format, const std::time_t datetime = std::time(nullptr));