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>| Déclaré dans l'en-tête <locale>
|
||
template< class CharT, class InputIt = std::istreambuf_iterator<CharT> > class time_get; |
||
Modèle de classe encapsule
std::time_get règles 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'entrée 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
Sommaire
Exigences de type
-InputIt must meet the requirements of InputIterator.
|
Spécialisations
Deux spécialisations et deux spécialisations partielles sont fournies par la bibliothèque standard et sont mises en œuvre par tous les objets créés 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 représentations de chaîne é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 représentations de chaîne 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 représentations de chaîne étroites de la date et l'heure à l'aide itérateur d'entrée 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 représentations de chaîne larges de date et d'heure en utilisant itérateur d'entrée 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 | Définition |
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) | |
Détruit 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 protégée) | |
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) |
Protégé 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 préféré de la journée, le mois et l'année 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 protégée) |
[ 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'entrée 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 protégée) |
[ 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'année de flux d'entrée 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 protégée) |
[ 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'entrée 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 protégée) |
[ 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'entrée 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 protégée) |
[ 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 année à partir du flux d'entrée 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 protégée) |
[ 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'entrée, selon le format spécifié 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 protégée) |
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'énumération date de commande, définir 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);
}
Résultat :
Sun Feb 18 23:12:34 2011
Voir aussi
formats contenu de struct std::tm pour la sortie en tant que séquence de caractèresOriginal: 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 générique) | |
(C++11) |
analyse une valeur de date / heure de format spécifié 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 générique) |