mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
285: Pass interval id to extensions
This commit is contained in:
parent
e8511c5efd
commit
da27fdcdf0
1 changed files with 6 additions and 8 deletions
|
@ -99,16 +99,14 @@ std::string Interval::serialize () const
|
|||
std::string Interval::json () const
|
||||
{
|
||||
std::stringstream out;
|
||||
out << '{';
|
||||
out << "{\"id\":" << id;
|
||||
|
||||
if (is_started ())
|
||||
out << "\"start\":\"" << start.toISO () << "\"";
|
||||
if (is_started ()) {
|
||||
out << ",\"start\":\"" << start.toISO () << "\"";
|
||||
}
|
||||
|
||||
if (is_ended ())
|
||||
{
|
||||
if (is_started ())
|
||||
out << ',';
|
||||
out << "\"end\":\"" << end.toISO () << "\"";
|
||||
if (is_ended ()) {
|
||||
out << ",\"end\":\"" << end.toISO () << "\"";
|
||||
}
|
||||
|
||||
if (! _tags.empty ())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue