std::time_get
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 InputIt = std::istreambuf_iterator<CharT> > class time_get; |
||
Vorlage Klasse
std::time_get kapselt Datum und Uhrzeit Parsing-Regeln. Die I / O-Manipulator std::get_time nutzt die std::time_get Facette des I / O-Streams locale, um die Texteingabe zu einer std::tm Objekt konvertieren .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.
You can help to correct and verify the translation. Click here for instructions.
Inheritance diagram
Type Anforderungen
-InputIt must meet the requirements of InputIterator.
|
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_get<char>
|
analysiert engen String-Darstellungen von Datum und Uhrzeit
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>
|
analysiert breite Zeichenfolgendarstellungen von Datum und Uhrzeit
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>
|
analysiert engen String-Darstellungen von Datum und Uhrzeit unter Verwendung benutzerdefinierter Eingabe-Iterator
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>
|
analysiert breite Zeichenfolgendarstellungen von Datum und Uhrzeit unter Verwendung benutzerdefinierter Eingabe-Iterator
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. |
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
|
InputIt
|
Member-Funktionen
baut eine neue time_get Facette 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. (öffentliche Elementfunktion) | |
zerstört sich eine time_get Facette 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. (geschützt Member-Funktion) | |
Beruft 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. (öffentliche Elementfunktion) | |
Beruft 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. (öffentliche Elementfunktion) | |
Beruft 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. (öffentliche Elementfunktion) | |
Beruft 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. (öffentliche Elementfunktion) | |
Beruft 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. (öffentliche Elementfunktion) | |
Beruft 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. (öffentliche Elementfunktion) | |
Beruft 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. (ö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] |
erhält bevorzugte Reihenfolge von Tag, Monat und Jahr 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. (virtuellen geschützten Member-Funktion) |
[virtuell] |
Extrakte Stunden, Minuten und Sekunden von Eingabestrom 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. (virtuellen geschützten Member-Funktion) |
[virtuell] |
Extrakte Monat, Tag und Jahr von Input-Stream 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. (virtuellen geschützten Member-Funktion) |
[virtuell] |
extracts the name of a day of the week from input stream (virtuellen geschützten Member-Funktion) |
[virtuell] |
extacts einen Monat Namen von Input-Stream 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. (virtuellen geschützten Member-Funktion) |
[virtuell] |
extrahiert ein Jahr ab Input-Stream 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. (virtuellen geschützten Member-Funktion) |
[virtuell] |
extrahiert Datum / Uhrzeit Komponenten aus Input-Streams, nach dem vorgegebenen Format 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. (virtuellen geschützten Member-Funktion) |
Inherited from std::time_base
Type
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
|
Datum geordnet Aufzählungstyp, definiert die Werte
no_order, dmy, mdy, ymd und ydmOriginal: date order enumeration type, defining the values no_order, dmy, mdy, ymd, and ydmThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Beispiel
#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
Siehe auch
Formate Inhalt struct std::tm für die Ausgabe als ZeichenfolgeOriginal: formats contents of struct std::tm for output as character sequenceThe 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) |
analysiert ein Datum / Zeit-Wert der angegebenen Format 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. (Funktions-Template) |