名前空間
変種
操作

std::time_get

提供: cppreference.com
< cpp‎ | locale

 
 
ローカライゼーションライブラリ
ロケールおよびファセット
Original:
Locales and facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
locale
文字分類
Original:
Character classification
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
変換
Original:
Conversions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ファセットカテゴリの基底クラスです
Original:
Facet category base classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ファセットカテゴリ
Original:
Facet categories
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ロケール固有のファセット
Original:
Locale-specific facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
コー​​ド変換ファセット
Original:
Code conversion facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
codecvt_utf8(C++11)
codecvt_utf16(C++11)
Cロケール
Original:
C locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
 
Defined in header <locale>
template<

    class CharT,
    class InputIt = std::istreambuf_iterator<CharT>

> class time_get;
クラステンプレートstd::time_getは、日付と時刻の構文解析規則をカプセル化します。 I / Oのマニピュレータstd::get_timestd::time_getオブジェクトへのテキスト入力を変換するために、I / Oストリームのロケールのstd::tmファセットを使用しています.
Original:
Class template std::time_get encapsulates date and time parsing rules. The I/O manipulator std::get_time uses the std::time_get facet of the I/O stream's locale to convert text input to a std::tm object.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
cpp/locale/time basecpp/locale/locale/facetstd-time get-inheritance.svg
画像の詳細

Inheritance diagram

目次

[編集] 型の要件

-
InputIt must meet the requirements of InputIterator.

[編集] スペシャ

2つの専門分野と2部分的な特殊化は、標準ライブラリによって提供されており、C + +プログラムで作成されたすべてのロケール·オブジェクトによって実装されます
Original:
Two specializations and two partial specializations are provided by the standard library and are implemented by all locale objects created in a C++ program:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Defined in header <locale>
std::time_get<char>
日付と時刻の狭い文字列表現を解析します
Original:
parses narrow string representations of date and time
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::time_get<wchar_t>
日付と時刻のワイド文字列表現を解析します
Original:
parses wide string representations of date and time
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::time_get<char, InputIt>
カスタム入力イテレータを使用して、日付と時刻の狭い文字列表現を解析します
Original:
parses narrow string representations of date and time using custom input iterator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::time_get<wchar_t, InputIt>
カスタム入力イテレータを使用して、日付と時刻のワイド文字列表現を解析します
Original:
parses wide string representations of date and time using custom input iterator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] メンバータイプ

メンバー·タイプ
Original:
Member type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Definition
char_type CharT
iter_type InputIt

[編集] メンバ関数

新しいtime_getファセットを構築します
Original:
constructs a new time_get facet
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数)
time_getファセットを破棄します
Original:
destructs a time_get facet
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(protectedメンバー関数)
do_date_orderを呼び出します
Original:
invokes do_date_order
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
do_get_timeを呼び出します
Original:
invokes do_get_time
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
do_get_dateを呼び出します
Original:
invokes do_get_date
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
do_get_weekdayを呼び出します
Original:
invokes do_get_weekday
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
do_get_monthnameを呼び出します
Original:
invokes do_get_monthname
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
do_get_yearを呼び出します
Original:
invokes do_get_year
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
do_getを呼び出します
Original:
invokes do_get
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]

[編集] メンバーオブジェクト

static std::locale::id id
idはロケールの
Original:
id of the locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバオブジェクト)

[編集] メンバ関数を保護しました

取得日、月、年の順序が好ましい
Original:
obtains preferred ordering of day, month, and year
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(仮想protectedメンバ関数) [edit]
[仮想]
時間、分、秒、入力ストリームからの抽出
Original:
extracts hours, minutes, and seconds from input stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(仮想protectedメンバ関数) [edit]
[仮想]
入力ストリームから月、日、年を抽出します
Original:
extracts month, day, and year from input stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(仮想protectedメンバ関数) [edit]
extracts the name of a day of the week from input stream
(仮想protectedメンバ関数) [edit]
入力ストリームから月の名前をextacts
Original:
extacts a month name from input stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(仮想protectedメンバ関数) [edit]
[仮想]
入力ストリームから年を抽出します
Original:
extracts a year from input stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(仮想protectedメンバ関数) [edit]
[仮想]
指定された形式に従って、入力ストリームから日付/時刻の成分を抽出する
Original:
extracts date/time components from input stream, according to the specified format
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(仮想protectedメンバ関数) [edit]

Inherited from std::time_base

タイプ
Original:
Type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Definition
dateorder
日付順に列挙型、値を定義no_orderdmymdyymd、とydm
Original:
date order enumeration type, defining the values no_order, dmy, mdy, ymd, and ydm
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集]

#include <iostream>
#include <sstream>
#include <string>
#include <locale>
#include <ctime>
#include <iomanip>
int main()
{
    std::wstring input = L"2011-Februar-18 23:12:34";
    std::tm t;
    std::wistringstream ss(input);
    ss.imbue(std::locale("de_DE"));
    ss >> std::get_time(&t, L"%Y-%b-%d %H:%M:%S"); // uses std::time_get<wchar_t>
    std::cout << std::asctime(&t);
}

Output:

Sun Feb 18 23:12:34 2011

[編集] も参照してください

文字シーケンスとして出力struct std::tmの形式が内容
Original:
formats contents of struct std::tm for output as character sequence
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(クラステンプレート)
(C++11)
指定された形式の日付/時刻値を解析します
Original:
parses a date/time value of specified format
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(関数テンプレート)