Espaces de noms
Variantes
Affichages
Actions

std::time_put

De cppreference.com
< cpp‎ | locale

 
 
Bibliothèque localisations
Locales et facettes
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
Classification des caractères
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.
Conversions
Original:
Conversions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Classes de facettes catégorie de 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.
Catégories de facettes
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.
Spécifique aux paramètres régionaux facettes
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.
Facettes de conversion de code
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.
 
std::time_put
Les fonctions membres
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
time_put::time_put
time_put::~time_put
time_put::put
time_put::do_put
 
Defined in header <locale>
template<

    class CharT,
    class OutputIt = std::ostreambuf_iterator<CharT>

> class time_put;
Modèle de classe std::time_put encapsule les règles de formatage de date et heure. Le manipulateur std::put_time I / O utilise la facette std::time_put de la localisation du flux d'E / S à générer représentation textuelle d'un objet std::tm .
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.
cpp/locale/time basecpp/locale/locale/facetstd-time put-inheritance.svg
À propos de cette image

Inheritance diagram

Sommaire

[modifier] Exigences de type

-
OutputIt must meet the requirements of OutputIterator.

[modifier] 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.
Defined in header <locale>
std::time_put<char>
crée une chaine de caractères étroits de la date et de l'heure
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>
crée une chaine de caractères larges de la date et de l'heure
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>
crée une chaine de caractères étroits de date et d'heure en utilisant un itérateur de sortie personnalisé
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>
crée une chaine de caractères larges de la date et l'heure à l'aide itérateur de sortie personnalisé
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.

[modifier] Types de membres

Type du membre Définition
char_type CharT
iter_type OutputIt

[modifier] Fonctions membres

constructs a new time_put facet
(fonction membre publique) [edit]
Détruit une facette time_put
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.

(fonction membre protégée) [edit]
Invoque 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.

(fonction membre publique) [edit]

[modifier] 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)

[modifier] 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.
]
formats de date / heure et écrit dans le flux de sortie
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.

(fonction membre virtuelle protégée de std::time_get) [edit]

[modifier] Exemple

#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';
}

Résultat :

水曜日 2011年11月09日 12時32分05秒

[modifier] Voir aussi

représente le système fourni par std::time_put pour l'environnement local nommé
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.

(classe générique) [edit]
analyse temps / valeur à la date d'une séquence de caractères d'entrée en struct std::tm
Original:
parses time/date values from an input character sequence into struct std::tm
The 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) [edit]
(C++11)
formats et émet une valeur de date / heure selon le format spécifié
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.

(fonction générique) [edit]