#ifndef BOOST_NO_STD_ITERATOR_TRAITS
{
res = L"2003-Aug-21";
- std::wstringstream wss(L"2003-Aug-21");
+ std::wstringstream wss2(L"2003-Aug-21");
date testdate(not_a_date_time);
- wss >> testdate;
+ wss2 >> testdate;
check("date operator>>", to_simple_wstring(testdate) == res);
}
#else
res = L"August";
check("greg_month as_long_wstring", ws == res);
/*{
- std::wstringstream wss(L"August");
+ std::wstringstream wss2(L"August");
greg_month testmonth(not_a_date_time);
- wss >> testmonth;
+ wss2 >> testmonth;
check("greg_month operator>>", to_simple_wstring(testmonth) == res);
}*/
res = L"Thursday";
check("greg_day_of_week as_long_wstring", ws == res);
/*{
- std::wstringstream wss(L"Thu");
+ std::wstringstream wss2(L"Thu");
greg_day_of_week testday(not_a_date_time);
- wss >> testday;
+ wss2 >> testday;
check("greg_day_of_week operator>>", to_simple_wstring(testday) == res);
}*/
ws = to_iso_wstring(dp);
check("date_period to_iso_string", ws == res);
{
- std::wstringstream wss(L"[2003-Aug-21/2004-May-27]");
+ std::wstringstream wss2(L"[2003-Aug-21/2004-May-27]");
res = L"[2003-Aug-21/2004-May-26]";
// following line gives an ambiguous overload of op>>
//date_period testperiod(date(not_a_date_time),date_duration(not_a_date_time));
date_period testperiod(date(2003,Aug,21), date(2004,May,27));
- wss >> testperiod;
+ wss2 >> testperiod;
check("date_period operator>>", to_simple_wstring(testperiod) == res);
}
check("date_duration", wss.str() == res);
wss.str(L"");
{
- std::wstringstream wss(L"280");
+ std::wstringstream wss2(L"280");
date_duration testduration(not_a_date_time);
- wss >> testduration;
+ wss2 >> testduration;
check("date_duration operator>>", testduration.days() == 280);
}