diff options
author | Dominick Allen <djallen@librehumanitas.org> | 2024-09-28 17:39:03 -0500 |
---|---|---|
committer | Dominick Allen <djallen@librehumanitas.org> | 2024-09-28 17:39:03 -0500 |
commit | 876c829512301e3f20161f05d7c193540e6d1710 (patch) | |
tree | 17cb3f1956d88ce87e1bcd980ea67f0592b0bed4 /src/bookmouse_time.hpp | |
parent | dac2e7507d0172e2a87ed5b2df9c320bc9717da6 (diff) |
Working through file picker.
Diffstat (limited to 'src/bookmouse_time.hpp')
-rw-r--r-- | src/bookmouse_time.hpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/bookmouse_time.hpp b/src/bookmouse_time.hpp new file mode 100644 index 0000000..5bd15a9 --- /dev/null +++ b/src/bookmouse_time.hpp @@ -0,0 +1,32 @@ +#ifndef BOOKMOUSE_TIME_HPP +#define BOOKMOUSE_TIME_HPP + +#include <fud_status.hpp> +#include <fud_result.hpp> +#include <fud_string.hpp> + +#include <ctime> + +namespace bookmouse { + +using TimeInfo = struct tm; + +class TimeFormat { +public: + explicit TimeFormat(const char* format); + explicit TimeFormat(const fud::String& format); + + fud::Result<fud::String, fud::FudStatus> format(const TimeInfo& timeInfo); + + // fud::FudStatus setFormatString(const fud::String& format); + +private: + fud::String m_format; + size_t m_sizeNeeded; + bool m_utf8Valid{false}; +}; + + +} // namespace bookmouse + +#endif |