Espacios de nombres
Variantes
Acciones

std::time_get

De cppreference.com
< cpp‎ | locale

 
 
Localizaciones biblioteca
Locales y facetas
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
Carácter clasificación
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.
Conversiones
Original:
Conversions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Facet clases categoría base
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.
Categorías faceta
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.
Específico de la localidad facetas
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.
Facetas código de conversión
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 locale
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;
Plantilla Clase std::time_get encapsula las reglas de fecha y hora de análisis. El manipulador std::get_time E / S utiliza la faceta std::time_get de la configuración regional del flujo de E / S para convertir la entrada de texto a un objeto 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
Acerca de esta imagen

Inheritance diagram

Contenido

[editar] Tipo de requisitos

-
InputIt must meet the requirements of InputIterator.

[editar] Especializaciones

Dos especializaciones y dos especializaciones parciales son proporcionados por la biblioteca estándar y son aplicadas por todos los objetos creados en un entorno nacional C + + programa:
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>
analiza las representaciones estrechas cadena de fecha y hora
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>
analiza las representaciones de ancho de cadena de fecha y hora
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>
analiza las representaciones estrechas cadena de fecha y hora utilizando iterador de entrada personalizado
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>
analiza las representaciones de ancho de cadena de fecha y hora utilizando iterador de entrada personalizado
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.

[editar] Tipos de miembros

Miembro de tipo
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

[editar] Las funciones miembro

construye una nueva faceta 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.

(miembro público función)
destructs una faceta 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.

(protegidos función miembro)
Invoca 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.

(miembro público función) [edit]
Invoca 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.

(miembro público función) [edit]
Invoca 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.

(miembro público función) [edit]
Invoca 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.

(miembro público función) [edit]
Invoca 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.

(miembro público función) [edit]
Invoca 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.

(miembro público función) [edit]
Invoca 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.

(miembro público función) [edit]

[editar] Objetos miembros

static std::locale::id id
Identificador de la configuración regional
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.

(objeto miembro del público)

[editar] Protegido funciones miembro

obtiene preferido orden de día, mes y año
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.

(virtuales protegidos miembro de función) [edit]
[virtual]
extractos de horas, minutos y segundos de flujo de entrada
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.

(virtuales protegidos miembro de función) [edit]
[virtual]
extractos de mes, día y año de la corriente de entrada
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.

(virtuales protegidos miembro de función) [edit]
extracts the name of a day of the week from input stream
(virtuales protegidos miembro de función) [edit]
extacts un nombre de mes de la corriente de entrada
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.

(virtuales protegidos miembro de función) [edit]
[virtual]
extrae un año a partir de flujo de entrada
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.

(virtuales protegidos miembro de función) [edit]
[virtual]
extrae los componentes de fecha / hora de flujo de entrada, de acuerdo con el formato especificado
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.

(virtuales protegidos miembro de función) [edit]

Inherited from std::time_base

Tipo
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
orden de fecha de tipo de enumeración, definición de los valores no_order, dmy, mdy, ymd y 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.

[editar] Ejemplo

#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

[editar] Ver también

formatos de contenido de struct std::tm para la salida como secuencia de caracteres
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.

(clase de plantilla)
(C++11)
analiza un valor de fecha / hora de formato especificado
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.

(función de plantilla)