[PATCH 2/2] json: date_relative for threads

pazz patricktotzke at googlemail.com
Sat Jul 23 02:54:04 PDT 2011


include the date_relative field in the
json formated output of notmuch search
---
 notmuch-search.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/notmuch-search.c b/notmuch-search.c
index faccaf7..b1adc03 100644
--- a/notmuch-search.c
+++ b/notmuch-search.c
@@ -176,12 +176,14 @@ format_thread_json (const void *ctx,
 
     printf ("\"thread\": %s,\n"
 	    "\"timestamp\": %ld,\n"
+	    "\"date_relative\": \"%s\",\n"
 	    "\"matched\": %d,\n"
 	    "\"total\": %d,\n"
 	    "\"authors\": %s,\n"
 	    "\"subject\": %s,\n",
 	    json_quote_str (ctx_quote, thread_id),
 	    date,
+	    notmuch_time_relative_date (ctx, date),
 	    matched,
 	    total,
 	    json_quote_str (ctx_quote, authors),
-- 
1.7.4.1



More information about the notmuch mailing list