json: date_relative for threads

include the date_relative field in the
json formated output of notmuch search
This commit is contained in:
pazz 2011-07-23 10:54:04 +01:00 committed by David Bremner
parent e81e3d1bdb
commit 80936b5f58

View file

@ -176,12 +176,14 @@ format_thread_json (const void *ctx,
printf ("\"thread\": %s,\n" printf ("\"thread\": %s,\n"
"\"timestamp\": %ld,\n" "\"timestamp\": %ld,\n"
"\"date_relative\": \"%s\",\n"
"\"matched\": %d,\n" "\"matched\": %d,\n"
"\"total\": %d,\n" "\"total\": %d,\n"
"\"authors\": %s,\n" "\"authors\": %s,\n"
"\"subject\": %s,\n", "\"subject\": %s,\n",
json_quote_str (ctx_quote, thread_id), json_quote_str (ctx_quote, thread_id),
date, date,
notmuch_time_relative_date (ctx, date),
matched, matched,
total, total,
json_quote_str (ctx_quote, authors), json_quote_str (ctx_quote, authors),