[PATCH 1/3] notmuch: Add `date_relative' to JSON search output.
David Edmondson
dme at dme.org
Mon Nov 29 02:29:57 PST 2010
Provide consumers of the JSON search output with the standard notmuch
relative date for each thread.
---
notmuch-search.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/notmuch-search.c b/notmuch-search.c
index c628b36..d49556b 100644
--- a/notmuch-search.c
+++ b/notmuch-search.c
@@ -152,12 +152,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,
+ json_quote_str (ctx_quote, notmuch_time_relative_date (ctx, date)),
matched,
total,
json_quote_str (ctx_quote, authors),
--
1.7.2.3
More information about the notmuch
mailing list