Espacios de nombres
Variantes
Acciones

std::time_put

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.
 
std::time_put
Las funciones miembro
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
time_put::time_put
time_put::~time_put
time_put::put
time_put::do_put
 
Defined in header <locale>
template<

    class CharT,
    class OutputIt = std::ostreambuf_iterator<CharT>

> class time_put;
Plantilla Clase std::time_put encapsula las reglas de formato de fecha y hora. El manipulador std::put_time E / S utiliza la faceta std::time_put de la configuración regional del flujo de E / S para generar una representación de texto de un objeto std::tm .
Original:
Class template std::time_put encapsulates date and time formatting rules. The I/O manipulator std::put_time uses the std::time_put facet of the I/O stream's locale to generate text representation of an 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 put-inheritance.svg
Acerca de esta imagen

Inheritance diagram

Contenido

[editar] Tipo de requisitos

-
OutputIt must meet the requirements of OutputIterator.

[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_put<char>
crea representaciones estrechas de cadena de fecha y hora
Original:
creates 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_put<wchar_t>
crea representaciones de ancho de cadena de fecha y hora
Original:
creates 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_put<char, OutputIt>
crea representaciones estrechas de cadena de fecha y hora utilizando iterador de salida personalizado
Original:
creates narrow string representations of date and time using custom output 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_put<wchar_t, OutputIt>
crea representaciones de ancho de cadena de fecha y hora utilizando iterador de salida personalizado
Original:
creates wide string representations of date and time using custom output 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 OutputIt

[editar] Las funciones miembro

constructs a new time_put facet
(miembro público función) [edit]
destructs una faceta time_put
Original:
destructs a time_put 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) [edit]
Invoca do_put
Original:
invokes do_put
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

[virtual]
formatos de fecha / hora y escribe a la corriente de salida
Original:
formats date/time and writes to output 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 of std::time_get miembro de función) [edit]

[editar] Ejemplo

#include <iostream>
#include <ctime>
#include <iomanip>
#include <codecvt>
 
int main()
{
    std::time_t t = std::time(NULL);
    std::wbuffer_convert<std::codecvt_utf8<wchar_t>> conv(std::cout.rdbuf());
    std::wostream out(&conv);
    out.imbue(std::locale("ja_JP"));
    // this I/O manipulator std::put_time uses std::time_put<wchar_t>
    out << std::put_time(std::localtime(&t), L"%A %c") << '\n';
}

Output:

水曜日 2011年11月09日 12時32分05秒

[editar] Ver también

representa el sistema suministrado por std::time_put para la localidad nombrada
Original:
represents the system-supplied std::time_put for the named locale
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) [edit]
analiza hora / fecha valores de una secuencia de caracteres de entrada en struct std::tm
Original:
parses time/date values from an input character sequence into struct std::tm
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) [edit]
(C++11)
formatos y las salidas un valor de fecha / tiempo de acuerdo con el formato especificado
Original:
formats and outputs a date/time value 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.

(función de plantilla) [edit]