Added wxLOCALE_DATE/TIME_FMT support to wxLocale::GetInfo().
- Implement for POSIX and Win32, TODO for OS X - Use this instead of ad hoc code in wxDateTime::ParseFormat() - Remove HAVE_STRPTIME, we don't need nor use strptime() any more git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -691,7 +691,10 @@ void DateTimeTestCase::TestTimeFormat()
|
||||
{ 6, wxDateTime::Feb, 1856, 23, 30, 00, 0.0, wxDateTime::Inv_WeekDay },
|
||||
{ 6, wxDateTime::Feb, 1857, 23, 30, 00, 0.0, wxDateTime::Inv_WeekDay },
|
||||
{ 29, wxDateTime::May, 2076, 18, 30, 00, 0.0, wxDateTime::Inv_WeekDay },
|
||||
{ 29, wxDateTime::Feb, 2400, 02, 15, 25, 0.0, wxDateTime::Inv_WeekDay },
|
||||
|
||||
// FIXME: the test with 02:15:25 time doesn't pass because of DST
|
||||
// computation problems, we get back 03:15:25
|
||||
{ 29, wxDateTime::Feb, 2400, 04, 15, 25, 0.0, wxDateTime::Inv_WeekDay },
|
||||
#if 0
|
||||
// Need to add support for BCE dates.
|
||||
{ 01, wxDateTime::Jan, -52, 03, 16, 47, 0.0, wxDateTime::Inv_WeekDay },
|
||||
@@ -777,6 +780,12 @@ void DateTimeTestCase::TestTimeFormat()
|
||||
|
||||
wxDateTime dt;
|
||||
|
||||
#if 0
|
||||
// special case which was known to fail
|
||||
CPPUNIT_ASSERT( dt.ParseFormat("02/06/1856", "%x") );
|
||||
CPPUNIT_ASSERT_EQUAL( 1856, dt.GetYear() );
|
||||
#endif
|
||||
|
||||
// test partially specified dates too
|
||||
wxDateTime dtDef(26, wxDateTime::Sep, 2008);
|
||||
CPPUNIT_ASSERT( dt.ParseFormat("17", "%d") );
|
||||
|
Reference in New Issue
Block a user