mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-21 07:43:08 +02:00
DOM: Migrated from Date to ISO8601d
This commit is contained in:
parent
4f156c407c
commit
6bb58286dc
1 changed files with 2 additions and 3 deletions
|
@ -32,7 +32,6 @@
|
|||
#include <Context.h>
|
||||
#include <Nibbler.h>
|
||||
#include <ISO8601.h>
|
||||
#include <Date.h>
|
||||
#include <text.h>
|
||||
#include <i18n.h>
|
||||
#include <DOM.h>
|
||||
|
@ -320,7 +319,7 @@ bool DOM::get (const std::string& name, const Task& task, Variant& value)
|
|||
|
||||
if (ref.size () && size == 2 && column && column->type () == "date")
|
||||
{
|
||||
Date date (ref.get_date (canonical));
|
||||
ISO8601d date (ref.get_date (canonical));
|
||||
if (elements[1] == "year") { value = Variant (static_cast<int> (date.year ())); return true; }
|
||||
else if (elements[1] == "month") { value = Variant (static_cast<int> (date.month ())); return true; }
|
||||
else if (elements[1] == "day") { value = Variant (static_cast<int> (date.day ())); return true; }
|
||||
|
@ -384,7 +383,7 @@ bool DOM::get (const std::string& name, const Task& task, Variant& value)
|
|||
// <annotations>.<N>.entry.hour
|
||||
// <annotations>.<N>.entry.minute
|
||||
// <annotations>.<N>.entry.second
|
||||
Date date (i.first.substr (11));
|
||||
ISO8601d date (i.first.substr (11));
|
||||
if (elements[3] == "year") { value = Variant (static_cast<int> (date.year ())); return true; }
|
||||
else if (elements[3] == "month") { value = Variant (static_cast<int> (date.month ())); return true; }
|
||||
else if (elements[3] == "day") { value = Variant (static_cast<int> (date.day ())); return true; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue