- Fixed bug whereby the "dateformat" configuration variable was being used to display dates, but not parse them.

This commit is contained in:
Paul Beckingham 2008-06-11 01:14:22 -04:00
parent 07d1f63e31
commit 131693f617
11 changed files with 209 additions and 124 deletions

View file

@ -659,6 +659,12 @@ void Table::suppressWS ()
mSuppressWS = true;
}
////////////////////////////////////////////////////////////////////////////////
void Table::setDateFormat (const std::string& dateFormat)
{
mDateFormat = dateFormat;
}
////////////////////////////////////////////////////////////////////////////////
int Table::rowCount ()
{
@ -771,8 +777,8 @@ void Table::sort (std::vector <int>& order)
else
{
Date dl ((std::string)*left);
Date dr ((std::string)*right);
Date dl ((std::string)*left, mDateFormat);
Date dr ((std::string)*right, mDateFormat);
if (dl > dr)
SWAP
}
@ -789,8 +795,8 @@ void Table::sort (std::vector <int>& order)
else
{
Date dl ((std::string)*left);
Date dr ((std::string)*right);
Date dl ((std::string)*left, mDateFormat);
Date dr ((std::string)*right, mDateFormat);
if (dl < dr)
SWAP
}