mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
- Fixed bug whereby the "dateformat" configuration variable was being used to display dates, but not parse them.
This commit is contained in:
parent
07d1f63e31
commit
131693f617
11 changed files with 209 additions and 124 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue