mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
TND2: Migrated from Date to ISO8601d
This commit is contained in:
parent
ec073c5dae
commit
fb280edbc2
1 changed files with 7 additions and 7 deletions
14
src/TDB2.cpp
14
src/TDB2.cpp
|
@ -34,7 +34,7 @@
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <Context.h>
|
#include <Context.h>
|
||||||
#include <Color.h>
|
#include <Color.h>
|
||||||
#include <Date.h>
|
#include <ISO8601.h>
|
||||||
#include <i18n.h>
|
#include <i18n.h>
|
||||||
#include <text.h>
|
#include <text.h>
|
||||||
#include <util.h>
|
#include <util.h>
|
||||||
|
@ -638,7 +638,7 @@ void TDB2::update (
|
||||||
// old <task>
|
// old <task>
|
||||||
// new <task>
|
// new <task>
|
||||||
// ---
|
// ---
|
||||||
undo.add_line ("time " + Date ().toEpochString () + "\n");
|
undo.add_line ("time " + ISO8601d ().toEpochString () + "\n");
|
||||||
undo.add_line ("old " + original.composeF4 () + "\n");
|
undo.add_line ("old " + original.composeF4 () + "\n");
|
||||||
undo.add_line ("new " + task.composeF4 () + "\n");
|
undo.add_line ("new " + task.composeF4 () + "\n");
|
||||||
undo.add_line ("---\n");
|
undo.add_line ("---\n");
|
||||||
|
@ -657,7 +657,7 @@ void TDB2::update (
|
||||||
// time <time>
|
// time <time>
|
||||||
// new <task>
|
// new <task>
|
||||||
// ---
|
// ---
|
||||||
undo.add_line ("time " + Date ().toEpochString () + "\n");
|
undo.add_line ("time " + ISO8601d ().toEpochString () + "\n");
|
||||||
undo.add_line ("new " + task.composeF4 () + "\n");
|
undo.add_line ("new " + task.composeF4 () + "\n");
|
||||||
undo.add_line ("---\n");
|
undo.add_line ("---\n");
|
||||||
}
|
}
|
||||||
|
@ -962,7 +962,7 @@ void TDB2::show_diff (
|
||||||
const std::string& prior,
|
const std::string& prior,
|
||||||
const std::string& when)
|
const std::string& when)
|
||||||
{
|
{
|
||||||
Date lastChange (strtol (when.c_str (), NULL, 10));
|
ISO8601d lastChange (strtol (when.c_str (), NULL, 10));
|
||||||
|
|
||||||
// Set the colors.
|
// Set the colors.
|
||||||
Color color_red (context.color () ? context.config.get ("color.undo.before") : "");
|
Color color_red (context.color () ? context.config.get ("color.undo.before") : "");
|
||||||
|
@ -1209,7 +1209,7 @@ int TDB2::gc ()
|
||||||
|
|
||||||
// Scan all pending tasks, looking for any that need to be relocated to
|
// Scan all pending tasks, looking for any that need to be relocated to
|
||||||
// completed, or need to be 'woken'.
|
// completed, or need to be 'woken'.
|
||||||
Date now;
|
ISO8601d now;
|
||||||
std::string status;
|
std::string status;
|
||||||
for (auto& task : pending_tasks)
|
for (auto& task : pending_tasks)
|
||||||
{
|
{
|
||||||
|
@ -1221,7 +1221,7 @@ int TDB2::gc ()
|
||||||
}
|
}
|
||||||
else if (status == "waiting")
|
else if (status == "waiting")
|
||||||
{
|
{
|
||||||
Date wait (task.get_date ("wait"));
|
ISO8601d wait (task.get_date ("wait"));
|
||||||
if (wait < now)
|
if (wait < now)
|
||||||
{
|
{
|
||||||
task.set ("status", "pending");
|
task.set ("status", "pending");
|
||||||
|
@ -1261,7 +1261,7 @@ int TDB2::gc ()
|
||||||
}
|
}
|
||||||
else if (status == "waiting")
|
else if (status == "waiting")
|
||||||
{
|
{
|
||||||
Date wait (task.get_date ("wait"));
|
ISO8601d wait (task.get_date ("wait"));
|
||||||
if (wait < now)
|
if (wait < now)
|
||||||
{
|
{
|
||||||
task.set ("status", "pending");
|
task.set ("status", "pending");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue