namespace std {
class time_base;
}
概要
time_baseは、日付の要素(日・月・年)の並び順を表す列挙型を定義する基底クラスである。
time_getはこのクラスを継承しており、time_get::date_order()がこの列挙値を返す。
メンバ型
| 名前 | 説明 |
|---|---|
dateorder |
日付の表記順を表す列挙型 |
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;
}
出力例
false
- 返る値はロケールおよび処理系に依存する。
"C"ロケールに対してno_orderを返す処理系もあれば、mdyを返す処理系もある
バージョン
言語
- C++98