1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // REQUIRES: locale.en_US.UTF-8
11 // REQUIRES: locale.fr_FR.UTF-8
12 // REQUIRES: locale.ru_RU.UTF-8
13 // REQUIRES: locale.zh_CN.UTF-8
17 // class time_get_byname<charT, InputIterator>
19 // dateorder date_order() const;
23 #include "test_iterators.h"
25 #include "platform_support.h" // locale name macros
27 typedef std::time_get_byname<char, input_iterator<const char*> > F;
33 explicit my_facet(const std::string& nm, std::size_t refs = 0)
40 const my_facet f(LOCALE_en_US_UTF_8, 1);
41 assert(f.date_order() == std::time_base::mdy);
44 const my_facet f(LOCALE_fr_FR_UTF_8, 1);
45 assert(f.date_order() == std::time_base::dmy);
48 const my_facet f(LOCALE_ru_RU_UTF_8, 1);
49 assert(f.date_order() == std::time_base::dmy);
52 const my_facet f(LOCALE_zh_CN_UTF_8, 1);
53 assert(f.date_order() == std::time_base::ymd);