mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 19:20:05 +00:00
Refactor clock format to wxdata
This commit is contained in:
parent
bb287dad9c
commit
a7cb459e20
6 changed files with 42 additions and 33 deletions
|
|
@ -1,7 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#include <scwx/util/iterator.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
# include <date/tz.h>
|
||||
|
|
@ -18,6 +21,19 @@ typedef std::chrono::time_zone time_zone;
|
|||
typedef date::time_zone time_zone;
|
||||
#endif
|
||||
|
||||
enum class ClockFormat
|
||||
{
|
||||
_12Hour,
|
||||
_24Hour,
|
||||
Unknown
|
||||
};
|
||||
typedef scwx::util::
|
||||
Iterator<ClockFormat, ClockFormat::_12Hour, ClockFormat::_24Hour>
|
||||
ClockFormatIterator;
|
||||
|
||||
ClockFormat GetClockFormat(const std::string& name);
|
||||
const std::string& GetClockFormatName(ClockFormat clockFormat);
|
||||
|
||||
std::chrono::system_clock::time_point TimePoint(uint32_t modifiedJulianDate,
|
||||
uint32_t milliseconds);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue