Condividi tramite


time_get::date_order

Restituisce la data ordine utilizzato da un facet.

dateorder date_order( ) const;

Valore restituito

Il data ordine utilizzato da un facet.

Note

La funzione membro restituisce do_date_order.

Esempio

// time_get_date_order.cpp
// compile with: /EHsc
#include <locale>
#include <iostream>
#include <sstream>
#include <time.h>
using namespace std;
void po( char *p )
{
   locale loc( p );

   time_get <char>::dateorder order = use_facet <time_get <char> >( loc ).date_order ( );
   cout << loc.name( );
   switch (order){
      case time_base::dmy: cout << "(day, month, year)" << endl;
      break;
      case time_base::mdy: cout << "(month, day, year)" << endl;
      break;
      case time_base::ydm: cout << "(year, day, month)" << endl;
      break;
      case time_base::ymd: cout << "(year, month, day)"<< endl;
      break;
      case time_base::no_order: cout << "(no_order)"<< endl;
      break;
   }
}

int main( )
{
   po( "C" );
   po( "german" );
   po( "English_Britain" );
}
  

Requisiti

intestazione: <locale>

Spazio dei nomi: deviazione standard

Vedere anche

Riferimenti

time_get Class