// // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh) // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 filetype=cpp.doxygen /*! \page formatting_and_parsing Numbers, Time and Currency formatting and parsing All formatting and parsing is performed via the standard I/O streams. Each of the above information types is represented as a number. The formatting information is set using iostream manipulators. All manipulators are placed in the boost::locale::as namespace. For example: \code cout << as::currency << 123.45 << endl; // display 123.45 in local currency representation. cin >> as::currency >> x ; // Parse currency representation and store it in x \endcode There is a special manipulator \c as::posix that "unsets" locale-specific settings and returns them to the default \c iostream formatting and parsing methods. Please note, such formats may still be localized by the default \c std::num_put and \c std::num_get facets. \section numbers_formatting Numbers and number manipulators Here are the manipulators for number formatting: - \c as::number -- format number according to local specifications, it takes into account various \c std::ios_base flags like scientific format and precision. \n - \c as::percent -- format number as "percent" format. For example: \code cout << as::percent << 0.25 <