mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Sort: Duration replaced by ISO8601p
This commit is contained in:
parent
0f611a34e3
commit
aab9ea1563
1 changed files with 5 additions and 5 deletions
10
src/sort.cpp
10
src/sort.cpp
|
@ -31,7 +31,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <Context.h>
|
||||
#include <Variant.h>
|
||||
#include <Duration.h>
|
||||
#include <ISO8601.h>
|
||||
#include <Task.h>
|
||||
#include <text.h>
|
||||
#include <i18n.h>
|
||||
|
@ -204,8 +204,8 @@ static bool sort_compare (int left, int right)
|
|||
if (left_string == right_string)
|
||||
continue;
|
||||
|
||||
Duration left_duration (left_string);
|
||||
Duration right_duration (right_string);
|
||||
ISO8601p left_duration (left_string);
|
||||
ISO8601p right_duration (right_string);
|
||||
return ascending ? (left_duration < right_duration)
|
||||
: (left_duration > right_duration);
|
||||
}
|
||||
|
@ -258,8 +258,8 @@ static bool sort_compare (int left, int right)
|
|||
if (left_string == right_string)
|
||||
continue;
|
||||
|
||||
Duration left_duration (left_string);
|
||||
Duration right_duration (right_string);
|
||||
ISO8601p left_duration (left_string);
|
||||
ISO8601p right_duration (right_string);
|
||||
return ascending ? (left_duration < right_duration)
|
||||
: (left_duration > right_duration);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue