std::time_put
Aus cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
<metanoindex/>
<tbody> </tbody>| definiert in Header <locale>
|
||
template< class CharT, class OutputIt = std::ostreambuf_iterator<CharT> > class time_put; |
||
Vorlage Klasse
std::time_put kapselt Datum und Uhrzeit Formatierung Regeln. Die I / O-Manipulator std::put_time nutzt die std::time_put Facette des I / O-Streams locale Text Darstellung eines std::tm Objekt zu erzeugen .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.
You can help to correct and verify the translation. Click here for instructions.
Inheritance diagram
Type Anforderungen
-OutputIt must meet the requirements of OutputIterator.
|
Spezialisierungen
Zwei Spezialisierungen und zwei partielle Spezialisierungen werden durch die Standard-Bibliothek zur Verfügung gestellt und werden von allen locale Objekte in einem C + +-Programm erstellt implementiert:
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.
You can help to correct and verify the translation. Click here for instructions.
definiert in Header
<locale> | |
std::time_put<char>
|
erzeugt eine enge String-Darstellungen von Datum und Uhrzeit
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>
|
schafft große String-Darstellungen von Datum und Uhrzeit
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>
|
erzeugt eine enge String-Darstellungen von Datum und Uhrzeit mit benutzerdefinierten Ausgabeiterator
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>
|
schafft große String-Darstellungen von Datum und Uhrzeit mit benutzerdefinierten Ausgabeiterator
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. |
Mitglied Typen
Mitglied Typ
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
|
Member-Funktionen
| constructs a new time_put facet (öffentliche Elementfunktion) | |
zerstört sich eine time_put Facette 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. (geschützt Member-Funktion) | |
Beruft 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. (öffentliche Elementfunktion) | |
Mitglied widerspricht
static std::locale::id id |
ID des Gebietsschemas 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. (öffentliche Member-Objekt) |
Geschützt Member-Funktionen
[virtuell] |
Formate Datum / Uhrzeit und schreibt Ausgabestream 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. (virtuellen geschützten Member-Funktion of std::time_get)
|
Beispiel
#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秒
Siehe auch
stellt das System bereitgestellten std::time_put für die benannte locale 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. (Klassen-Template) | |
parst Zeit / Datum-Werte von einem Eingang Zeichenfolge in struct std::tmOriginal: parses time/date values from an input character sequence into struct std::tmThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klassen-Template) | |
(C++11) |
Formate und gibt ein Datum / Zeit-Wert nach dem angegebenen Format 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. (Funktions-Template) |