booster::locale::as::ftime produces unexpected results
Brought to you by:
artyom-beilis
Hi Artyom,
Simple test:
using namespace booster::locale;
using namespace std;
int main()
{
generator gen;
std::locale::global(gen(""));
std::cout.imbue(std::locale());
string str1="2010-08-10";
string str2="10-08-2010";
istringstream is(str1);
date_time dt;
is >> as::ftime("%Y-%m-%d") >> dt;
cout << as::date << dt << endl;
istringstream is2(str2);
date_time dt2;
is2 >> as::ftime("%d-%m-%Y") >> dt2;
cout << as::date << dt2 << endl;
}
Prints:
[petr@petr-archlinux ~]$ ./a.out
10/08/2010
20/12/2009
Anonymous
Sorry, it seems like source forge didnt format the text properly. ive put it in a text file and uploaded it
Related to: #121
code used year of week instead of year
fixed