Namespace
Varianti

std::time_get

Da cppreference.com.
< cpp‎ | locale

 
 
Localizzazioni libreria
Impostazioni internazionali e sfaccettature
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
Carattere classificazione
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.
Conversioni
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 categoria classi di 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.
Facet categorie
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.
Locale specifici aspetti
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.
Codice di conversione sfaccettature
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.
 
 
Defined in header <locale>
template<

    class CharT,
    class InputIt = std::istreambuf_iterator<CharT>

> class time_get;
Modello di classe std::time_get incapsula le regole di analisi di data e ora. Il manipolatore di I / O std::get_time utilizza l'aspetto std::time_get del locale I / O ruscello per convertire l'input di testo a un oggetto 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.
cpp/locale/time basecpp/locale/locale/facetstd-time get-inheritance.svg
Informazioni sull'immagine

Inheritance diagram

Indice

[modifica] Tipo requisiti

-
InputIt must meet the requirements of InputIterator.

[modifica] Specializzazioni

Due specializzazioni e due specializzazioni parziali sono fornite dalla libreria standard e sono attuate da tutti gli oggetti delle impostazioni locali creati in un programma 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.
Defined in header <locale>
std::time_get<char>
analizza rappresentazioni di stringa strette di data e ora
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>
analizza rappresentazioni di stringa di larghezza di data e ora
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>
analizza rappresentazioni di stringa strette di data e ora utilizzando iteratore di input personalizzato
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>
analizza rappresentazioni di stringa di larghezza di data e ora utilizzando iteratore di input personalizzato
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.

[modifica] Membri tipi

Membro 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 InputIt

[modifica] Membri funzioni

costruisce un nuovo aspetto time_get
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.

(membro pubblico funzione)
distrugge un aspetto 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.

(protetto funzione membro)
Invoca 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.

(membro pubblico funzione) [edit]
Invoca 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.

(membro pubblico funzione) [edit]
Invoca 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.

(membro pubblico funzione) [edit]
Invoca 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.

(membro pubblico funzione) [edit]
Invoca 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.

(membro pubblico funzione) [edit]
Invoca 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.

(membro pubblico funzione) [edit]
Invoca 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.

(membro pubblico funzione) [edit]

[modifica] Membri oggetti

static std::locale::id id
' Id del locale
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.

(membro oggetto pubblico)

[modifica] Protetto funzioni membro

[virtuale]
ottiene preferito ordine del giorno, mese e anno
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.

(virtuale protetto funzione membro) [edit]
[virtuale]
ora estratti, minuti e secondi di flusso in ingresso
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.

(virtuale protetto funzione membro) [edit]
[virtuale]
estratti mese, il giorno e l'anno dal flusso di input
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.

(virtuale protetto funzione membro) [edit]
[virtuale]
extracts the name of a day of the week from input stream
(virtuale protetto funzione membro) [edit]
extacts nome di un mese dal flusso di input
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.

(virtuale protetto funzione membro) [edit]
[virtuale]
estrae un anno dal flusso di input
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.

(virtuale protetto funzione membro) [edit]
[virtuale]
estrae i componenti della data / ora dal flusso di input, in base al formato specificato
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.

(virtuale protetto funzione membro) [edit]

Inherited from std::time_base

Tipo
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
Per tipo di data enumerazione, definire i valori no_order, dmy, mdy, ymd e ydm
Original:
date order enumeration type, defining the values no_order, dmy, mdy, ymd, and ydm
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] Esempio

#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

[modifica] Vedi anche

formati contenuto di struct std::tm per l'output come sequenza di caratteri
Original:
formats contents of struct std::tm for output as character sequence
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe template)
(C++11)
analizza un valore data / ora del formato specificato
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.

(funzione di modello)