Add initial support for weekday formatting

This commit is contained in:
Victor Zverovich
2021-05-24 07:23:56 -07:00
parent 069131dc25
commit 1cd9899cf3
6 changed files with 157 additions and 33 deletions

View File

@@ -26,3 +26,12 @@ fmt::buffered_file open_buffered_file(FILE** fp) {
#endif
return f;
}
std::locale get_locale(const char* name) {
try {
return std::locale(name);
} catch (const std::runtime_error&) {
fmt::print(stderr, "{} locale is missing.\n", name);
}
return std::locale::classic();
}