Time and integer parsing

This commit is contained in:
Dan Paulat 2024-02-20 23:26:02 -06:00
parent c8d8b24317
commit 2cd76d7da4
4 changed files with 62 additions and 0 deletions

View file

@ -1,6 +1,7 @@
#pragma once
#include <chrono>
#include <optional>
#if !defined(_MSC_VER)
# include <date/tz.h>
@ -24,5 +25,9 @@ std::string TimeString(std::chrono::system_clock::time_point time,
const time_zone* timeZone = nullptr,
bool epochValid = true);
template<typename T>
std::optional<std::chrono::sys_time<T>>
TryParseDateTime(const std::string& dateTimeFormat, const std::string& str);
} // namespace util
} // namespace scwx