std::time_get
De 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>| Dclar dans l'en-tte <locale>
|
||
template< class CharT, class InputIt = std::istreambuf_iterator<CharT> > class time_get; |
||
Modle de classe encapsule
std::time_get rgles d'analyse date et l'heure. Le manipulateur std::get_time I / O utilise la facette std::time_get de la localisation du flux d'E / S pour convertir l'entre de texte pour un objet 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.
You can help to correct and verify the translation. Click here for instructions.
Inheritance diagram
Exigences de type
-InputIt must meet the requirements of InputIterator.
|
Spcialisations
Deux spcialisations et deux spcialisations partielles sont fournies par la bibliothque standard et sont mises en uvre par tous les objets crs dans un environnement linguistique programme 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.
You can help to correct and verify the translation. Click here for instructions.
Defined in header
<locale> | |
std::time_get<char>
|
analyse des reprsentations de chane troites de la date et de l'heure
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>
|
analyse des reprsentations de chane larges de la date et de l'heure
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>
|
analyse des reprsentations de chane troites de la date et l'heure l'aide itrateur d'entre personnalis
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>
|
analyse des reprsentations de chane larges de date et d'heure en utilisant itrateur d'entre personnalis
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. |
Types de membres
| Type du membre | Dfinition |
char_type
|
CharT
|
iter_type
|
InputIt
|
Fonctions membres
construit un nouveau 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. (fonction membre publique) | |
Dtruit une facette 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. (fonction membre protge) | |
Invoque 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. (fonction membre publique) | |
Invoque 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. (fonction membre publique) | |
Invoque 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. (fonction membre publique) | |
Invoque 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. (fonction membre publique) | |
Invoque 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. (fonction membre publique) | |
Invoque 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. (fonction membre publique) | |
Invoque 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. (fonction membre publique) | |
Objets membres
static std::locale::id id |
Id de la localisation 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. (objet membre public) |
Protg fonctions membres
[ virtuel ]Original: virtual The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
obtient la commande prfr de la journe, le mois et l'anne 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. (fonction membre virtuelle protge) |
[ virtuel ]Original: virtual The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
heures d'extraits, minutes et secondes du flux d'entre 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. (fonction membre virtuelle protge) |
[ virtuel ]Original: virtual The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
mois extraits, le jour et l'anne de flux d'entre 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. (fonction membre virtuelle protge) |
[ virtuel ]Original: virtual The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
extrait le nom d'un jour de la semaine du flux d'entre Original: extracts the name of a day of the week 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. (fonction membre virtuelle protge) |
[ virtuel ]Original: virtual The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
extacts un nom de mois partir du flux d'entre 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. (fonction membre virtuelle protge) |
[ virtuel ]Original: virtual The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
extrait d'une anne partir du flux d'entre 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. (fonction membre virtuelle protge) |
[ virtuel ]Original: virtual The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
extrait les composants de date / heure partir du flux d'entre, selon le format spcifi 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. (fonction membre virtuelle protge) |
Inherited from std::time_base
Type d'
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
|
type d'numration date de commande, dfinir les valeurs
no_order, dmy, mdy, ymd et 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. |
Exemple
#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);
}
Rsultat :
Sun Feb 18 23:12:34 2011
Voir aussi
formats contenu de struct std::tm pour la sortie en tant que squence de caractresOriginal: 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. (classe gnrique) | |
(C++11) |
analyse une valeur de date / heure de format spcifi 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. (fonction gnrique) |