- locale[meta header]
- std[meta namespace]
- class template[meta id-type]
namespace std {
class time_base;
}time_baseは、日付の要素(日・月・年)の並び順を表す列挙型を定義する基底クラスである。
time_getはこのクラスを継承しており、time_get::date_order()がこの列挙値を返す。
| 名前 | 説明 |
|---|---|
dateorder |
日付の表記順を表す列挙型 |
| 名前 | 説明 |
|---|---|
no_order |
特定の順序を持たない |
dmy |
日、月、年の順番 |
mdy |
月、日、年の順番 |
ymd |
年、月、日の順番 |
ydm |
年、日、月の順番 |
#include <iostream>
#include <locale>
int main()
{
const auto& facet = std::use_facet<std::time_get<char>>(std::locale::classic());
std::cout << std::boolalpha
<< (facet.date_order() == std::time_base::no_order) << std::endl;
}- std::time_base::no_order[color ff0000]
- std::time_get[link time_get.md]
- facet.date_order()[link time_get/date_order.md]
- std::use_facet[link use_facet.md]
- std::locale::classic()[link locale/classic.md]
false
- 返る値はロケールおよび処理系に依存する。
"C"ロケールに対してno_orderを返す処理系もあれば、mdyを返す処理系もある
- C++98